Motion vector prediction

ABSTRACT

A video coder may determine a motion vector of a non-adjacent block of a current picture of the video data. The non-adjacent block is non-adjacent to a current block of the current picture. Furthermore, the video coder determines, based on the motion vector of the non-adjacent block, a motion vector predictor (MVP) for the current block. The video coder may determine a motion vector of the current block. The video coder may also determine a predictive block based on the motion vector of the current block.

This application is a continuation of U.S. patent application Ser. No.16/003,269, filed Jun. 8, 2018, which claims the benefit of U.S.provisional patent application No. 62/519,007, filed Jun. 13, 2017, theentire content of each of which is incorporated by reference.

TECHNICAL FIELD

This disclosure relates to devices configured to perform video coding.

BACKGROUND

Digital video capabilities can be incorporated into a wide range ofdevices, including digital televisions, digital direct broadcastsystems, wireless broadcast systems, personal digital assistants (PDAs),laptop or desktop computers, tablet computers, e-book readers, digitalcameras, digital recording devices, digital media players, video gamingdevices, video game consoles, cellular or satellite radio telephones,so-called “smart phones,” video teleconferencing devices, videostreaming devices, and the like. Digital video devices implement videocompression techniques, such as those described in the standards definedby MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4, Part 10, AdvancedVideo Coding (AVC), or ITU-T H.265, High Efficiency Video Coding (HEVC),and extensions of such standards. The video devices may transmit,receive, encode, decode, and/or store digital video information moreefficiently by implementing such video compression techniques.

Video compression techniques may perform spatial (intra-picture)prediction and/or temporal (inter-picture) prediction to reduce orremove redundancy inherent in video sequences. For block-based videocoding, a video slice (e.g., a video frame or a portion of a videoframe) may be partitioned into video blocks, such as coding tree blocksand coding blocks. Spatial or temporal prediction results in apredictive block for a block to be coded. Residual data represents pixeldifferences between the original block to be coded and the predictiveblock. For further compression, the residual data may be transformedfrom the pixel domain to a transform domain, resulting in residualtransform coefficients, which then may be quantized.

SUMMARY

In general, this disclosure describes techniques related to motionvector prediction. The techniques of this disclosure may be applied toany of the existing video codecs, such as HEVC (High Efficiency VideoCoding) or any future video coding standards.

In one example, this disclosure describes a method of decoding videodata, the method comprising: determining, by a video decoder, a motionvector of a non-adjacent block of a current picture of the video data,the non-adjacent block being non-adjacent to a current block of thecurrent picture; determining, by the video decoder, based on the motionvector of the non-adjacent block, a motion vector predictor (MVP) forthe current block; determining, by the video decoder, based on the MVPfor the current block, a motion vector of the current block;determining, by the video decoder, a predictive block based on themotion vector of the current block; reconstructing, by the videodecoder, based on the predictive block, sample values of the currentpicture.

In another example, this disclosure describes a method of encoding videodata, the method comprising: determining, by a video encoder, a motionvector of a non-adjacent block of a current picture of the video data,the non-adjacent block being non-adjacent to a current block of thecurrent picture; determining, by the video encoder, based on the motionvector of the non-adjacent block, a motion vector predictor (MVP) forthe current block; determining, by the video encoder, a motion vector ofthe current block, wherein the motion vector is equal to a motion vectorof the MVP for the current block or is equal to the motion vector of theMVP for the current block plus a motion vector difference (MVD) signaledin a bitstream; determining, by the video encoder, a predictive blockbased on the motion vector of the current block; and generating, by thevideo encoder, based on the predictive block, residual sample values.

In another example, this disclosure describes an apparatus for decodingvideo data, the apparatus comprising: one or more storage mediaconfigured to store video data; and one or more processors configuredto: determine a motion vector of a non-adjacent block of a currentpicture of the video data, the non-adjacent block being non-adjacent toa current block of the current picture; determine, based on the motionvector of the non-adjacent block, a motion vector predictor (MVP) forthe current block; determine, based on the MVP for the current block, amotion vector of the current block; determine a predictive block basedon the motion vector of the current block; and reconstruct, based on thepredictive block, sample values of the current picture.

In another example, this disclosure describes an apparatus for encodingvideo data, the method comprising: determining, by a video encoder, amotion vector of a non-adjacent block of a current picture of the videodata, the non-adjacent block being non-adjacent to a current block ofthe current picture; determining, by the video encoder, based on themotion vector of the non-adjacent block, a motion vector predictor (MVP)for the current block; determining, by the video encoder a motion vectorof the current block, wherein the motion vector is equal to a motionvector of the MVP for the current block or is equal to the motion vectorof the MVP for the current block plus a motion vector difference (MVD)signaled in a bitstream; determining, by the video encoder, a predictiveblock based on the motion vector of the current block; and generating,by the video encoder, based on the predictive block, residual samplevalues.

In another example, this disclosure describes an apparatus for decodingvideo data, the apparatus comprising: means for determining a motionvector of a non-adjacent block of a current picture of the video data,the non-adjacent block being non-adjacent to a current block of thecurrent picture; means for determining, based on the motion vector ofthe non-adjacent block, a motion vector predictor (MVP) for the currentblock; means for determining, based on the MVP for the current block, amotion vector of the current block; means for determining a predictiveblock based on the motion vector of the current block; and means forreconstructing, based on the predictive block, sample values of thecurrent picture.

In another example, this disclosure describes an apparatus for encodingvideo data, the apparatus comprising: means for determining a motionvector of a non-adjacent block of a current picture of the video data,the non-adjacent block being non-adjacent to a current block of thecurrent picture; means for determining, based on the motion vector ofthe non-adjacent block, a motion vector predictor (MVP) for the currentblock; means for determining a motion vector of the current block,wherein the motion vector is equal to a motion vector of the MVP for thecurrent block or is equal to the motion vector of the MVP for thecurrent block plus a motion vector difference (MVD) signaled in abitstream; means for determining a predictive block based on the motionvector of the current block; and means for generating, based on thepredictive block, residual sample values.

In another example, this disclosure describes a computer-readablestorage medium storing instructions that, when executed, cause one ormore processors to: determine a motion vector of a non-adjacent block ofa current picture of the video data, the non-adjacent block beingnon-adjacent to a current block of the current picture; determine, basedon the motion vector of the non-adjacent block, a motion vectorpredictor (MVP) for the current block; determine, based on the MVP forthe current block, a motion vector of the current block; determine apredictive block based on the motion vector of the current block; andreconstruct, based on the predictive block, sample values of the currentpicture.

In another example, this disclosure describes a computer-readablestorage medium storing instructions that, when executed, cause one ormore processors to: determine a motion vector of a non-adjacent block ofa current picture of the video data, the non-adjacent block beingnon-adjacent to a current block of the current picture; determine, basedon the motion vector of the non-adjacent block, a motion vectorpredictor (MVP) for the current block; determine a motion vector of thecurrent block, wherein the motion vector is equal to a motion vector ofthe MVP for the current block or is equal to the motion vector of theMVP for the current block plus a motion vector difference (MVD) signaledin a bitstream; determine a predictive block based on the motion vectorof the current block; and generate, based on the predictive block,residual sample values.

The details of one or more aspects of the disclosure are set forth inthe accompanying drawings and the description below. Other features,objects, and advantages of the techniques described in this disclosurewill be apparent from the description, drawings, and claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system that may use one or more techniques described in thisdisclosure.

FIG. 2 is an example of spatial and temporal neighboring motion vectorcandidates for merge/skip modes.

FIG. 3 is an example of bilateral matching.

FIG. 4 is an example of template matching.

FIG. 5 is an example of unilateral motion estimation in frame-rate upconversion.

FIG. 6 is an example of a decoder-side motion vector refinement based onbilateral template matching.

FIG. 7 is an example of advanced temporal motion vector predictionmotion prediction for a coding unit.

FIG. 8 is an example of one coding unit with four sub-blocks and itsneighboring blocks.

FIG. 9 is a block diagram of an example simplified affine motion modelfor a current affine block.

FIG. 10 is an example of a simplified affine motion model for a currentaffine block.

FIG. 11 is an example of a motion compensation prediction motion vectorfield.

FIG. 12 is an example of a stored motion vector field.

FIG. 13 is an example of motion vector prediction for AF_INTER.

FIG. 14A is a block diagram illustrating a selection order for candidateblocks for AF_MERGE.

FIG. 14B is a block diagram illustrating candidates for AF_MERGE if aleft bottom candidate block is coded in affine mode.

FIG. 15 is a block diagram illustrating example non-adjacent blocks, inaccordance with a technique of this disclosure.

FIG. 16 is a block diagram illustrating an example of a selection ofnon-adjacent blocks, in accordance with a technique of this disclosure.

FIG. 17 is a block diagram illustrating an example of a selection ofnon-adjacent blocks based on a parent block.

FIG. 18A is a block diagram illustrating an example of positionmodification of a non-adjacent block, in accordance with a technique ofthis disclosure.

FIG. 18B is a block diagram illustrating an example of positionmodification of a non-adjacent block, in accordance with a technique ofthis disclosure.

FIG. 19A is a block diagram illustrating an example of a threshold formodifying a non-adjacent block, in accordance with a technique of thisdisclosure.

FIG. 19B is a block diagram illustrating an example of a threshold formodifying a non-adjacent block, in accordance with a technique of thisdisclosure.

FIG. 20 is a block diagram illustrating an example of a selection ofnon-adjacent blocks, in accordance with a technique of this disclosure.

FIG. 21 is a block diagram illustrating an example of a selection ofnon-adjacent blocks, in accordance with a technique of this disclosure.

FIG. 22 is a block diagram illustrating an example of a selection ofnon-adjacent blocks, in accordance with a technique of this disclosure.

FIG. 23 is a block diagram illustrating an example of a selection ofnon-adjacent blocks based on a parent block, in accordance with atechnique of this disclosure.

FIG. 24 is a block diagram illustrating an example video encoder thatmay implement one or more techniques described in this disclosure.

FIG. 25 is a block diagram illustrating an example video decoder thatmay implement one or more techniques described in this disclosure.

FIG. 26 is a flowchart illustrating an example operation of a videoencoder to encode video data, in accordance with one or more techniquesof this disclosure.

FIG. 27 is a flowchart illustrating an example operation of a videodecoder for decoding video data in accordance with one or moretechniques of this disclosure.

FIG. 28 is a flowchart illustrating an example operation for determininga NA-SMVP using Frame Rate Up-Conversion (FRUC) motion vectorcandidates, in accordance with a technique of this disclosure.

FIG. 29 is a flowchart illustrating an example operation of a videoencoder that includes synthetic candidates in a list of MVP candidatesfor a current block, in accordance with one or more techniques of thisdisclosure.

FIG. 30 is a flowchart illustrating an example operation of a videodecoder that includes synthetic candidates in a list of MVP candidatesfor a current block, in accordance with one or more techniques of thisdisclosure.

FIG. 31 is a flowchart illustrating an example operation of a videoencoder for encoding video data, in accordance with a technique of thisdisclosure.

FIG. 32 is a flowchart illustrating an example operation of a videodecoder for decoding video data, in accordance with a technique of thisdisclosure.

FIG. 33 is a flowchart illustrating an example operation of a videoencoder for encoding video data, in accordance with a technique of thisdisclosure.

FIG. 34 is a flowchart illustrating an example operation of a videodecoder for decoding video data, in accordance with a technique of thisdisclosure.

FIG. 35 is a flowchart illustrating an example operation of a videoencoder for encoding video data, in accordance with a technique of thisdisclosure.

FIG. 36 is a flowchart illustrating an example operation of a videodecoder for decoding video data, in accordance with a technique of thisdisclosure.

DETAILED DESCRIPTION

As video compression has improved, the proportion of encoded data usedto represent motion vectors has risen. Accordingly, to achieve greatervideo compression, it may be desirable to improve how motion vectors areencoded. Achieving greater video compression is desirable for manyreasons, such as being able to send higher-quality video data throughexisting infrastructure, reducing network congestion, and so on. Motionvector prediction is one common way of reducing the amount of data usedto encode a motion vector for a block. In most motion vector predictionsystems, a video encoder determines a list of motion vector predictorsfor the block, selects a motion vector predictor, and then signals aposition in the list of the selected motion vector. A video decoderdetermines the same list of motion vector predictors and determines theselected motion vector predictor based on data signaled in thebitstream. The video decoder may then use the motion vector predictor todetermine one or more motion vectors of the block.

This disclosure describes techniques that may improve motion vectorprediction, and thereby potentially improve video compressionefficiency, by more fully using reconstructed motion vector information.For example, this disclosure describes techniques that use motion vectorpredictors from one or more blocks of a current picture that are notspatially adjacent to a current block of the current picture. In thisexample, a video coder (e.g., a video encoder or a video decoder) maydetermine a motion vector of a non-adjacent block of a current pictureof the video data. The non-adjacent block is non-adjacent to a currentblock of the current picture. Furthermore, in this example, the videocoder may determine, based on the motion vector of the non-adjacentblock, a motion vector predictor (MVP) for the current block. The videocoder may then determine (e.g., based on the MVP for the current block)a motion vector of the current block. Additionally, the video coder maydetermine a predictive block based on the motion vector of the currentblock.

Furthermore, this disclosure describes techniques for generatingsynthetic motion vector candidates. This disclosure also describestechniques for generating additional temporal motion vector predictorcandidates. In addition, this disclosure describes techniques that useintra prediction modes from one or more blocks of a current picture thatare not spatially adjacent to a current block of the current picture todetermine one or more most probable intra prediction modes in a set ofmost probable intra prediction modes for the current block. Thetechniques of this disclosure, or sub-combinations thereof, may be usedtogether or separately.

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system 10 that may utilize techniques of this disclosure. Asshown in FIG. 1, system 10 includes a source device 12 that providesencoded video data to be decoded at a later time by a destination device14. Source device 12 may be an apparatus for encoding video data anddestination device 14 may be an apparatus for decoding video data. Inparticular, source device 12 provides the encoded video data todestination device 14 via a computer-readable medium 16. Source device12 and destination device 14 may comprise any of a wide range of devicesand apparatuses, including desktop computers, notebook (i.e., laptop)computers, tablet computers, set-top boxes, telephone handsets such asso-called “smart” phones, tablet computers, televisions, cameras,display devices, digital media players, video gaming consoles, videostreaming devices, or the like. In some cases, source device 12 anddestination device 14 are equipped for wireless communication. Thus,source device 12 and destination device 14 may be wireless communicationdevices. The techniques described in this disclosure may be applied towireless and/or wired applications. Source device 12 is an example videoencoding device (i.e., a device for encoding video data). Destinationdevice 14 is an example video decoding device (i.e., a device fordecoding video data).

The illustrated system 10 of FIG. 1 is merely one example. Techniquesfor processing video data may be performed by any digital video encodingand/or decoding device. In some examples, the techniques may beperformed by a video encoder/decoder, typically referred to as a“CODEC.” Source device 12 and destination device 14 are examples of suchcoding devices in which source device 12 generates coded video data fortransmission to destination device 14. In some examples, source device12 and destination device 14 operate in a substantially symmetricalmanner such that each of source device 12 and destination device 14include video encoding and decoding components. Hence, system 10 maysupport one-way or two-way video transmission between source device 12and destination device 14, e.g., for video streaming, video playback,video broadcasting, or video telephony.

In the example of FIG. 1, source device 12 includes a video source 18,storage media 19 configured to store video data, a video encoder 20, andan output interface 22. Destination device 14 includes an inputinterface 26, storage media 28 configured to store encoded video data, avideo decoder 30, and a display device 32. In other examples, sourcedevice 12 and destination device 14 include other components orarrangements. For example, source device 12 may receive video data froman external video source, such as an external camera. Likewise,destination device 14 may interface with an external display device,rather than including an integrated display device.

Video source 18 is a source of video data. The video data may comprise aseries of pictures. Video source 18 may include a video capture device,such as a video camera, a video archive containing previously capturedvideo, and/or a video feed interface to receive video data from a videocontent provider. In some examples, video source 18 generates computergraphics-based video data, or a combination of live video, archivedvideo, and computer-generated video. Storage media 19 may be configuredto store the video data. In each case, the captured, pre-captured, orcomputer-generated video may be encoded by video encoder 20.

Output interface 22 may output the encoded video information to acomputer-readable medium 16. Output interface 22 may comprise varioustypes of components or devices. For example, output interface 22 maycomprise a wireless transmitter, a modem, a wired networking component(e.g., an Ethernet card), or another physical component. In exampleswhere output interface 22 comprises a wireless transmitter, outputinterface 22 may be configured to transmit data, such as encoded videodata, modulated according to a cellular communication standard, such as4G, 4G-LTE, LTE Advanced, 5G, and the like. In some examples whereoutput interface 22 comprises a wireless transmitter, output interface22 may be configured to transmit data, such as encoded video data,modulated according to other wireless standards, such as an IEEE 802.11specification, an IEEE 802.15 specification (e.g., ZigBee™), aBluetooth™ standard, and the like. In some examples, circuitry of outputinterface 22 is integrated into circuitry of video encoder 20 and/orother components of source device 12. For example, video encoder 20 andoutput interface 22 may be parts of a system on a chip (SoC). The SoCmay also include other components, such as a general purposemicroprocessor, a graphics processing unit, and so on.

Destination device 14 may receive encoded video data to be decoded viacomputer-readable medium 16. Computer-readable medium 16 may compriseany type of medium or device capable of moving the encoded video datafrom source device 12 to destination device 14. In some examples,computer-readable medium 16 comprises a communication medium to enablesource device 12 to transmit encoded video data directly to destinationdevice 14 in real-time. The communication medium may comprise anywireless or wired communication medium, such as a radio frequency (RF)spectrum or one or more physical transmission lines. The communicationmedium may form part of a packet-based network, such as a local areanetwork, a wide-area network, or a global network such as the Internet.The communication medium may include routers, switches, base stations,or any other equipment that may be useful to facilitate communicationfrom source device 12 to destination device 14. Destination device 14may comprise one or more data storage media configured to store encodedvideo data and decoded video data.

In some examples, output interface 22 may output data, such as encodedvideo data, to an intermediate device, such as a storage device.Similarly, input interface 26 of destination device 14 may receiveencoded data from the intermediate device. The intermediate device mayinclude any of a variety of distributed or locally accessed data storagemedia such as a hard drive, Blu-ray discs, DVDs, CD-ROMs, flash memory,volatile or non-volatile memory, or any other suitable digital storagemedia for storing encoded video data. In some examples, the intermediatedevice corresponds to a file server. Example file servers include webservers, FTP servers, network attached storage (NAS) devices, or localdisk drives.

Destination device 14 may access the encoded video data through anystandard data connection, including an Internet connection. This mayinclude a wireless channel (e.g., a Wi-Fi connection), a wiredconnection (e.g., DSL, cable modem, etc.), or a combination of both thatis suitable for accessing encoded video data stored on a file server.The transmission of encoded video data from the storage device may be astreaming transmission, a download transmission, or a combinationthereof.

Computer-readable medium 16 may include transient media, such as awireless broadcast or wired network transmission, or storage media (thatis, non-transitory storage media), such as a hard disk, flash drive,compact disc, digital video disc, Blu-ray disc, or othercomputer-readable media. In some examples, a network server (not shown)may receive encoded video data from source device 12 and provide theencoded video data to destination device 14, e.g., via networktransmission. Similarly, a computing device of a medium productionfacility, such as a disc stamping facility, may receive encoded videodata from source device 12 and produce a disc containing the encodedvideo data. Therefore, computer-readable medium 16 may be understood toinclude one or more computer-readable media of various forms, in variousexamples.

Input interface 26 of destination device 14 receives data fromcomputer-readable medium 16. Input interface 26 may comprise varioustypes of components or devices. For example, input interface 26 maycomprise a wireless receiver, a modem, a wired networking component(e.g., an Ethernet card), or another physical component. In exampleswhere input interface 26 comprises a wireless receiver, input interface26 may be configured to receive data, such as the bitstream, modulatedaccording to a cellular communication standard, such as 4G, 4G-LTE, LTEAdvanced, 5G, and the like. In some examples where input interface 26comprises a wireless receiver, input interface 26 may be configured toreceive data, such as the bitstream, modulated according to otherwireless standards, such as an IEEE 802.11 specification, an IEEE 802.15specification (e.g., ZigBee™), a Bluetooth™ standard, and the like. Insome examples, circuitry of input interface 26 may be integrated intocircuitry of video decoder 30 and/or other components of destinationdevice 14. For example, video decoder 30 and input interface 26 may beparts of a SoC. The SoC may also include other components, such as ageneral purpose microprocessor, a graphics processing unit, and so on.

Storage media 28 may be configured to store encoded video data, such asencoded video data (e.g., a bitstream) received by input interface 26.Display device 32 displays the decoded video data to a user. Displaydevice 32 may comprise any of a variety of display devices such as aliquid crystal display (LCD), a plasma display, an organic lightemitting diode (OLED) display, or another type of display device.

Video encoder 20 and video decoder 30 each may be implemented as any ofa variety of suitable circuitry, such as one or more microprocessors,digital signal processors (DSPs), application specific integratedcircuits (ASICs), field programmable gate arrays (FPGAs), discretelogic, software, hardware, firmware or any combinations thereof. Whenthe techniques are implemented partially in software, a device may storeinstructions for the software in a suitable, non-transitorycomputer-readable medium and may execute the instructions in hardwareusing one or more processors to perform the techniques of thisdisclosure. Each of video encoder 20 and video decoder 30 may beincluded in one or more encoders or decoders, either of which may beintegrated as part of a combined encoder/decoder (CODEC) in a respectivedevice. In some examples, video encoder 20 and video decoder 30 encodeand decode video data according to a video coding standard orspecification. For example, video encoder 20 and video decoder 30 mayencode and decode video data according to ITU-T H.261, ISO/IEC MPEG-1Visual, ITU-T H.262 or ISO/IEC MPEG-2 Visual, ITU-T H.263, ISO/IECMPEG-4 Visual and ITU-T H.264 (also known as ISO/IEC MPEG-4 AVC),including its Scalable Video Coding (SVC) and Multi-View Video Coding(MVC) extensions, or another video coding standard or specification. Insome examples, video encoder 20 and video decoder 30 encode and decodevideo data according to the, High Efficiency Video Coding (HEVC), whichas known as or ITU-T H.265, its range and screen content codingextensions, its 3D video coding extension (3D-HEVC), its multiviewextension (MV-HEVC), or its scalable extension (SHVC). HEVC, SHVC, and3D-HEVC were developed by the Joint Collaboration Team on Video Coding(JCT-VC) as well as Joint Collaboration Team on 3D Video CodingExtension Development (JCT-3V) of ITU-T Video Coding Experts Group(VCEG) and ISO/IEC Motion Picture Experts Group (MPEG).

ITU-T VCEG (Q6/16) and ISO/IEC MPEG (JTC 1/SC 29/WG 11) are now studyingthe potential need for standardization of future video coding technologywith a compression capability that significantly exceeds that of thecurrent HEVC standard (including its current extensions and near-termextensions for screen content coding and high-dynamic-range coding). Thegroups are working together on this exploration activity in a jointcollaboration effort known as the Joint Video Exploration Team (JVET) toevaluate compression technology designs proposed by their experts inthis area. The JVET first met during 19-21 Oct. 2015. Chen et al.,“Algorithm Description of Joint Exploration Test Model 5,” Joint VideoExploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG11, 5^(th) Meeting, Geneva, CH, 12-20 Jan. 2017, document JVET E-1001,is an algorithm description of Joint Exploration Test Model 6 (JEM5).Chen et al., “Algorithm Description of Joint Exploration Test Model 6,”Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC1/SC 29/WG 11, 6^(th) Meeting, Hobart, AU, 31 Mar.-7 Apr. 2017, documentJVET F-1001, is an algorithm description of Joint Exploration Test Model6 (JEM6). Video encoder 20 and video decoder 30 may operate according tothe joint exploration model or the new Versatile Video Coding (VVC)standard currently under development.

This disclosure may generally refer to “signaling” certain information,such as syntax elements. The term “signaling” may generally refer to thecommunication of syntax elements and/or other data used to decode theencoded video data. Such communication may occur in real- ornear-real-time. Alternately, such communication may occur over a span oftime, such as might occur when storing syntax elements to acomputer-readable storage medium in a bitstream at the time of encoding,which then may be retrieved by a decoding device at any time after beingstored to this medium.

In HEVC and other video coding specifications, video data includes aseries of pictures. Pictures may also be referred to as “frames.” Apicture may include one or more sample arrays. Each respective samplearray of a picture may comprise an array of samples for a respectivecolor component. A picture may include three sample arrays, denotedS_(L), S_(Cb), and S_(Cr). S_(L) is a two-dimensional array (i.e., ablock) of luma samples. S_(Cb) is a two-dimensional array of Cb chromasamples. S_(Cr) is a two-dimensional array of Cr chroma samples. Inother instances, a picture may be monochrome and may only include anarray of luma samples.

As part of encoding video data, video encoder 20 may encode pictures ofthe video data. In other words, video encoder 20 may generate encodedrepresentations of the pictures of the video data. An encodedrepresentation of a picture may be referred to herein as a “codedpicture” or an “encoded picture.”

To generate an encoded representation of a picture, video encoder 20 mayencode blocks of the picture. Video encoder 20 may include, in abitstream, an encoded representation of the video block. In someexamples, to encode a block of the picture, video encoder 20 performsintra prediction or inter prediction to generate one or more predictiveblocks. Additionally, video encoder 20 may generate residual data forthe block. The residual block comprises residual samples. Each residualsample may indicate a difference between a sample of one of thegenerated predictive blocks and a corresponding sample of the block. Inthis way, video encoder 20 may generate, based on a predictive block,residual sample values. Video encoder 20 may apply a transform to blocksof residual samples to generate transform coefficients. Furthermore,video encoder 20 may quantize the transform coefficients. In someexamples, video encoder 20 may generate one or more syntax elements torepresent a transform coefficient. Video encoder 20 may entropy encodeone or more of the syntax elements representing the transformcoefficient.

More specifically, when encoding video data according to HEVC or othervideo coding specifications, to generate an encoded representation of apicture, video encoder 20 may partition each sample array of the pictureinto coding tree blocks (CTBs) and encode the CTBs. A CTB may be an N×Nblock of samples in a sample array of a picture. In the HEVC mainprofile, the size of a CTB can range from 16×16 to 64×64, althoughtechnically 8×8 CTB sizes can be supported.

A coding tree unit (CTU) of a picture may comprise one or more CTBs andmay comprise syntax structures used to encode the samples of the one ormore CTBs. For instance, each a CTU may comprise a CTB of luma samples,two corresponding CTBs of chroma samples, and syntax structures used toencode the samples of the CTBs. In monochrome pictures or pictureshaving three separate color planes, a CTU may comprise a single CTB andsyntax structures used to encode the samples of the CTB. A CTU may alsobe referred to as a “tree block” or a “largest coding unit” (LCU). Inthis disclosure, a “syntax structure” may be defined as zero or moresyntax elements present together in a bitstream in a specified order. Insome codecs, an encoded picture is an encoded representation containingall CTUs of the picture.

To encode a CTU of a picture, video encoder 20 may partition the CTBs ofthe CTU into one or more coding blocks. A coding block is an N×N blockof samples. In some codecs, to encode a CTU of a picture, video encoder20 may recursively perform quad-tree partitioning on the coding treeblocks of a CTU to partition the CTBs into coding blocks, hence the name“coding tree units.” A coding unit (CU) may comprise one or more codingblocks and syntax structures used to encode samples of the one or morecoding blocks. For example, a CU may comprise a coding block of lumasamples and two corresponding coding blocks of chroma samples of apicture that has a luma sample array, a Cb sample array, and a Cr samplearray, and syntax structures used to encode the samples of the codingblocks. In monochrome pictures or pictures having three separate colorplanes, a CU may comprise a single coding block and syntax structuresused to code the samples of the coding block. In HEVC, the largestcoding unit in a slice is called a coding tree block (CTB) or codingtree unit (CTU). A CTB contains a quad-tree the nodes of which are CUs.The size of a CTB can range from 16×16 to 64×64 in the HEVC main profile(although technically 8×8 CTB sizes can be supported). A coding unit(CU) can be the same size of a CTB though and can be as small as 8×8.Each coding unit is coded with one mode.

Furthermore, video encoder 20 may encode CUs of a picture of the videodata. In some codecs, as part of encoding a CU, video encoder 20 maypartition a coding block of the CU into one or more prediction blocks. Aprediction block is a rectangular (i.e., square or non-square) block ofsamples on which the same prediction is applied. A prediction unit (PU)of a CU may comprise one or more prediction blocks of a CU and syntaxstructures used to predict the one or more prediction blocks. Forexample, a PU may comprise a prediction block of luma samples, twocorresponding prediction blocks of chroma samples, and syntax structuresused to predict the prediction blocks. In monochrome pictures orpictures having three separate color planes, a PU may comprise a singleprediction block and syntax structures used to predict the predictionblock.

Video encoder 20 may generate a predictive block (e.g., a luma, Cb, andCr predictive block) for a prediction block (e.g., luma, Cb, and Crprediction block) of a PU of a CU. Video encoder 20 may use intraprediction or inter prediction to generate a predictive block. If videoencoder 20 uses intra prediction to generate a predictive block, videoencoder 20 may generate the predictive block based on decoded samples ofthe picture that includes the CU. If video encoder 20 uses interprediction to generate a predictive block of a PU of a current picture,video encoder 20 may generate the predictive block of the PU based ondecoded samples of a reference picture (i.e., a picture other than thecurrent picture). In HEVC, video encoder 20 generates a“prediction_unit” syntax structure within a “coding_unit” syntaxstructure for inter predicted PUs, but does not generate a“prediction_unit” syntax structure within a “coding_unit” syntaxstructure for intra predicted PUs. Rather, in HEVC, syntax elementsrelated to intra predicted PUs are included directly in the“coding_unit” syntax structure. When a CU is inter coded, the CU may befurther partitioned into 2 or 4 PUs or become just one PU when furtherpartitioning does not apply. When two PUs are present in one CU, theycan be half size rectangles or two rectangle size with ¼ or ¾ size ofthe CU. When the CU is inter coded, one set of motion information ispresent for each PU. In addition, each PU is coded with a uniqueinter-prediction mode to derive the set of motion information. In thisdisclosure, the terminology “block” may refer to CU, PU or any othercoding units used for video coding purpose.

A video coder, such as video encoder 20 or video decoder 30, may performintra prediction using an intra prediction mode selected from aplurality of available intra prediction modes. The intra predictionmodes may include directional intra prediction modes, which may also bereferred to as intra prediction directions. Different directional intraprediction modes correspond to different angles. In some examples, todetermine a value of a current sample of a predictive block using adirectional intra prediction mode, the video coder may determine a pointwhere a line passing through the current sample at the anglecorresponding to the directional intra prediction mode intersects a setof border samples. The border samples may comprise samples in a columnimmediately left of the predictive block and samples in a rowimmediately above the predictive block. If the point is between two ofthe border samples, the video coder may interpolate or otherwisedetermine a value corresponding to the point. If the point correspondsto a single one of the border samples, the video coder may determinethat the value of the point is equal to the border sample. The videocoder may set the value of the current sample of the predictive blockequal to the determined value of the point.

In HEVC and some other codecs, video encoder 20 encodes a CU using onlyone prediction mode (i.e., intra prediction or inter prediction). Thus,in HEVC and particular other codecs, video encoder 20 may generatepredictive blocks of each PU of a CU using intra prediction or videoencoder 20 may generate predictive blocks of each PU of the CU usinginter prediction. When video encoder 20 uses inter prediction to encodea CU, video encoder 20 may partition the CU into 2 or 4 PUs, or one PUcorresponds to the entire CU. When two PUs are present in one CU, thetwo PUs can be half size rectangles or two rectangle sizes with ¼ or ¾size of the CU. In HEVC, there are eight partition modes for a CU codedwith inter prediction mode, i.e., PART_2N×2N, PART_2N×N, PART_N×2N,PART_N×N, PART_2N×nU, PART_2N×nD, PART_nL×2N and PART_nR×2N. When a CUis intra predicted, 2N×2N and N×N are the only permissible PU shapes,and within each PU a single intra prediction mode is coded (while chromaprediction mode is signaled at CU level).

Video encoder 20 may generate one or more residual blocks for the CU.For instance, video encoder 20 may generate a luma residual block forthe CU. Each sample in the CU's luma residual block indicates adifference between a luma sample in one of the CU's predictive lumablocks and a corresponding sample in the CU's original luma codingblock. In addition, video encoder 20 may generate a Cb residual blockfor the CU. Each sample in the Cb residual block of a CU may indicate adifference between a Cb sample in one of the CU's predictive Cb blocksand a corresponding sample in the CU's original Cb coding block. Videoencoder 20 may also generate a Cr residual block for the CU. Each samplein the CU's Cr residual block may indicate a difference between a Crsample in one of the CU's predictive Cr blocks and a correspondingsample in the CU's original Cr coding block.

Furthermore, video encoder 20 may decompose the residual blocks of a CUinto one or more transform blocks. For instance, video encoder 20 mayuse quad-tree partitioning to decompose the residual blocks of a CU intoone or more transform blocks. A transform block is a rectangular (e.g.,square or non-square) block of samples on which the same transform isapplied. A transform unit (TU) of a CU may comprise one or moretransform blocks. For example, a TU may comprise a transform block ofluma samples, two corresponding transform blocks of chroma samples, andsyntax structures used to transform the transform block samples. Thus,each TU of a CU may have a luma transform block, a Cb transform block,and a Cr transform block. The luma transform block of the TU may be asub-block of the CU's luma residual block. The Cb transform block may bea sub-block of the CU's Cb residual block. The Cr transform block may bea sub-block of the CU's Cr residual block. In monochrome pictures orpictures having three separate color planes, a TU may comprise a singletransform block and syntax structures used to transform the samples ofthe transform block.

Video encoder 20 may apply one or more transforms to a transform blockof a TU to generate a coefficient block for the TU. A coefficient blockmay be a two-dimensional array of transform coefficients. A transformcoefficient may be a scalar quantity. In some examples, the one or moretransforms convert the transform block from a pixel domain to afrequency domain. Thus, in such examples, a transform coefficient may bea scalar quantity considered to be in a frequency domain. A transformcoefficient level is an integer quantity representing a value associatedwith a particular 2-dimensional frequency index in a decoding processprior to scaling for computation of a transform coefficient value.

In some examples, video encoder 20 skips application of the transformsto the transform block. In such examples, video encoder 20 may treatresidual sample values in the same way as transform coefficients. Thus,in examples where video encoder 20 skips application of the transforms,the following discussion of transform coefficients and coefficientblocks may be applicable to transform blocks of residual samples.

According to JEM, a video coder (such as video encoder 200) partitions apicture into a plurality of coding tree units (CTUs). Video encoder 200may partition a CTU according to a tree structure, such as aquadtree-binary tree (QTBT) structure. The QTBT structure of JEM removesthe concepts of multiple partition types, such as the separation betweenCUs, PUs, and TUs of HEVC. Thus, in the context of the JEM, the term“PU” or “TU” may apply to a CU. A QTBT structure of JEM includes twolevels: a first level partitioned according to quadtree partitioning,and a second level partitioned according to binary tree partitioning. Aroot node of the QTBT structure corresponds to a CTU. Leaf nodes of thebinary trees correspond to coding units (CUs).

In some examples, video encoder 200 and video decoder 300 may use asingle QTBT structure to represent each of the luminance and chrominancecomponents, while in other examples, video encoder 200 and video decoder300 may use two or more QTBT structures, such as one QTBT structure forthe luminance component and another QTBT structure for both chrominancecomponents (or two QTBT structures for respective chrominancecomponents).

After generating a coefficient block, video encoder 20 may quantize thecoefficient block to possibly reduce the amount of data used torepresent the coefficient block, potentially providing furthercompression. Quantization generally refers to a process in which a rangeof values is compressed to a single value. For example, quantization maybe done by dividing a value by a constant, and then rounding to thenearest integer. To quantize the coefficient block, video encoder 20 mayquantize transform coefficients of the coefficient block. Quantizationmay reduce the bit depth associated with some or all the transformcoefficients. For example, an n-bit transform coefficient may be roundeddown to an m-bit transform coefficient during quantization, where n isgreater than m. In some examples, video encoder 20 skips quantization.

Video encoder 20 may generate syntax elements indicating some or all thepotentially quantized transform coefficients. Video encoder 20 mayentropy encode one or more of the syntax elements indicating a quantizedtransform coefficient. For example, video encoder 20 may performContext-Adaptive Binary Arithmetic Coding (CABAC) on the syntax elementsindicating the quantized transform coefficients. Thus, an encoded block(e.g., an encoded CU) may include the entropy encoded syntax elementsindicating the quantized transform coefficients.

Video encoder 20 may output a bitstream that includes encoded videodata. In other words, video encoder 20 may output a bitstream thatincludes an encoded representation of video data. The encodedrepresentation of the video data may include an encoded representationof pictures of the video data. For example, the bitstream may comprise asequence of bits that forms a representation of encoded pictures of thevideo data and associated data. In some examples, a representation of anencoded picture may include encoded representations of blocks of thepicture.

Video decoder 30 may receive a bitstream generated by video encoder 20.As noted above, the bitstream may comprise an encoded representation ofvideo data. Video decoder 30 may decode the bitstream to reconstructpictures of the video data. As part of decoding the bitstream, videodecoder 30 may obtain syntax elements from the bitstream. Video decoder30 may reconstruct pictures of the video data based at least in part onthe syntax elements obtained from the bitstream. The process toreconstruct pictures of the video data may be generally reciprocal tothe process performed by video encoder 20 to encode the pictures.

For instance, as part of decoding a picture of the video data, videodecoder 30 may use inter prediction or intra prediction to generatepredictive blocks. Additionally, video decoder 30 may determinetransform coefficients based on syntax elements obtained from thebitstream. In some examples, video decoder 30 inverse quantizes thedetermined transform coefficients. Inverse quantization maps quantizedvalue to a reconstructed value. For instance, video decoder 30 mayinverse quantize a value by determining the value multiplied by aquantization step size. Furthermore, video decoder 30 may apply aninverse transform on the determined transform coefficients to determinevalues of residual samples. Video decoder 30 may reconstruct a block ofthe picture based on the residual samples and corresponding samples ofthe generated predictive blocks. For instance, video decoder 30 may addresidual samples to corresponding samples of the generated predictiveblocks to determine reconstructed samples of the block.

More specifically, in HEVC and other video coding specifications, videodecoder 30 may use inter prediction or intra prediction to generate oneor more predictive blocks for each PU of a current CU. In addition,video decoder 30 may inverse quantize coefficient blocks of TUs of thecurrent CU. Video decoder 30 may perform inverse transforms on thecoefficient blocks to reconstruct transform blocks of the TUs of thecurrent CU. Video decoder 30 may reconstruct a coding block of thecurrent CU based on samples of the predictive blocks of the PUs of thecurrent CU and residual samples of the transform blocks of the TUs ofthe current CU. In some examples, video decoder 30 may reconstruct thecoding blocks of the current CU by adding the samples of the predictiveblocks for PUs of the current CU to corresponding decoded samples of thetransform blocks of the TUs of the current CU. By reconstructing thecoding blocks for each CU of a picture, video decoder 30 may reconstructthe picture.

A slice of a picture may include an integer number of blocks of thepicture. For example, in HEVC and other video coding specifications, aslice of a picture may include an integer number of CTUs of the picture.The CTUs of a slice may be ordered consecutively in a scan order, suchas a raster scan order. In HEVC and potentially other codecs, a slice isdefined as an integer number of CTUs contained in one independent slicesegment and all subsequent dependent slice segments (if any) thatprecede the next independent slice segment (if any) within the sameaccess unit. Furthermore, in HEVC and potentially other codecs, a slicesegment is defined as an integer number of CTUs ordered consecutively inthe tile scan and contained in a single NAL unit. A tile scan is aspecific sequential ordering of CTBs partitioning a picture in which theCTBs are ordered consecutively in CTB raster scan in a tile, whereastiles in a picture are ordered consecutively in a raster scan of thetiles of the picture. A tile is a rectangular region of CTBs within aparticular tile column and a particular tile row in a picture.

As mentioned above, a video coder (e.g., video encoder 20 or videodecoder 30) may apply inter prediction to generate a predictive blockfor a video block of a current picture. For instance, in the context ofHEVC and other video coding specifications, the video coder may applyinter prediction to generate a predictive block for a prediction blockof a PU of a CU of the current block. If the video coder applies interprediction to generate a predictive block, the video coder may generatethe predictive block based on decoded samples of one or more referencepictures. The reference pictures are pictures other than the currentpicture. The video coder may determine one or more reference picturelists. Each of the reference picture lists may include zero or morereference pictures. In the context of HEVC and other video codingspecifications, one of the reference picture lists may be referred to asReference Picture List 0 (i.e., RefPicList0 or list0) and anotherreference picture list may be referred to as Reference Picture list 1(i.e., RefPicList1 or list1).

The video coder may apply uni-directional inter prediction orbi-directional inter prediction to generate a predictive block. When thevideo coder applies uni-directional inter prediction to generate apredictive block for a video block, the video coder determines a singlereference block for the video block based on samples of a singlereference picture. Furthermore, when the video coder appliesuni-directional inter prediction, the video coder may set the predictiveblock equal to the reference block. When the video coder appliesbi-directional inter prediction to generate a predictive block for avideo block, the video coder determines two reference blocks for thevideo block. In some examples, the two reference blocks are in referencepictures in different reference picture lists. Additionally, when thevideo coder applies bi-direction inter-prediction, the video coder maydetermine the predictive block based on the two reference blocks. Forinstance, the video coder may determine the predictive block such thateach sample of the predictive block is a weighted average ofcorresponding samples of the two reference blocks. Reference listindicators may be used to indicate which of the reference picture listsinclude reference pictures used for determining reference blocks.

As mentioned above, a video coder may determine a reference block basedon samples of a reference picture. In some examples, the video coder maydetermine the reference block such that each sample of the referenceblock is equal to a sample of the reference picture. In some examples,as part of determining a reference block, the video coder mayinterpolate samples of the reference block from samples of the referencepicture. For example, the video coder may determine that a sample of thepredictive block is a weighted average of two or more samples of thereference picture.

In some examples, when video encoder 20 performs uni-directional interprediction, video encoder 20 searches for a reference block within oneor more reference pictures in one of the reference picture lists. Thereference block may be a block of samples that is similar to theprediction block. In some examples, video encoder 20 uses a mean squarederror to determine the similarity between the reference block and theprediction block Furthermore, video encoder 20 may determine motioninformation for the prediction block. The motion information (i.e., themotion parameters) for the prediction block may include a motion vectorand a reference index. The motion vector may indicate a spatialdisplacement between a position of the particular video block within thecurrent picture (i.e., the picture that includes the particular videoblock) and a position of the reference block within the referencepicture. The reference index indicates a position within the referencepicture list of the reference frame that contains the reference picturelist. The predictive block for the particular video block may be equalto the reference block.

When video encoder 20 performs bi-directional inter prediction for aparticular video block, video encoder 20 may search for a firstreference block within reference pictures in a first reference picturelist (“list 0”) and may search for a second reference block withinreference pictures in a second reference picture list (“list 1”). Videoencoder 20 may generate, based at least in part on the first and thesecond reference blocks, the predictive block for the particular videoblock. In addition, video encoder 20 may generate a first motion vectorthat indicates a spatial displacement between the particular video blockand the first reference block. Video encoder 20 may also generate afirst reference index that identifies a location within the firstreference picture list of the reference picture that contains the firstreference block. Furthermore, video encoder 20 may generate a secondmotion vector that indicates a spatial displacement between theparticular video block and the second reference block. Video encoder 20may also generate a second reference index that identifies a locationwithin the second reference picture list of the reference picture thatincludes the second reference block.

When video encoder 20 performs uni-directional inter prediction on aparticular video block, video decoder 30 may use the motion informationof the particular video block to identify the reference block of theparticular video block. Video decoder 30 may then generate thepredictive block of the particular video block based on the referenceblock. When video encoder 20 performs bi-directional inter prediction todetermine a predictive block for a particular video block, video decoder30 may use the motion information of the particular video block todetermine two reference blocks. Video decoder 30 may generate thepredictive block of the particular video block based on the tworeference samples of the particular video block. In this way, for eitheruni-directional inter prediction or bi-directional inter prediction,video encoder 20 and video decoder 30 may determine a predictive blockbased on a motion vector of a block.

Video encoder 20 may signal motion information of a video unit invarious ways. Such motion information may include motion vectors,reference indexes, reference picture list indicators, and/or other datarelated to motion. In some examples, video encoder 20 and video decoder30 may use motion prediction to reduce the amount of data used forsignaling motion information. Motion prediction may comprise thedetermination of motion information of a video unit (e.g., a PU) basedon motion information of one or more other video units. There arevarious types of motion prediction. For instance, merge mode andadvanced motion vector prediction (AMVP) mode are two types of motionprediction. That is, in the HEVC standard, there are two interprediction modes, named merge (skip is considered as a special case ofmerge) and advanced motion vector prediction (AMVP) modes respectivelyfor a prediction unit (PU). In either AMVP or merge mode, a motionvector (MV) candidate list is maintained for multiple motion vectorpredictors. See J.-L. Lin, Y.-W. Chen, Y.-W. Huang, and S.-M. Lei,“Motion vector coding in the HEVC standard,” Selected Topics in SignalProcessing, IEEE Journal of, vol. 7, no. 6, pp. 957-968, 2013.

In merge mode, video encoder 20 generates a candidate list. Thecandidate list includes a set of candidates that indicate the motioninformation of one or more source video units. The source video unitsmay spatially or temporally neighbor a current video unit. Furthermore,in merge mode, video encoder 20 may select a candidate from thecandidate list and may use the motion information indicated by theselected candidate as the motion information of the current video unit.Video encoder 20 may signal the position in the candidate list of theselected candidate. Video decoder 30 may determine, based on informationobtained from a bitstream, the index into the candidate list. Inaddition, video decoder 30 may generate the same candidate list and maydetermine, based on the index, the selected candidate. Video decoder 30may then use the motion information of the selected candidate togenerate a predictive block for the current video unit.

Skip mode is similar to merge mode. In skip mode, video encoder 20 andvideo decoder 30 generate and use a candidate list in the same way thatvideo encoder 20 and video decoder 30 use the candidate list in mergemode. However, when video encoder 20 signals the motion information of acurrent video unit using skip mode, video encoder 20 does not signal anyresidual data for the current video unit. Accordingly, video decoder 30may determine, without use of residual data, a predictive block for thevideo unit based on one or more reference blocks indicated by the motioninformation of a selected candidate in the candidate list.

For the skip mode and merge mode, a merge index is signaled to indicatewhich candidate in the merging candidate list is used. No interprediction indicator, reference index, or motion vector difference istransmitted. Two or more types of merging candidates are considered inmerge mode including: spatial motion vector predictors (SMVPs) andtemporal motion vector predictors (TMVPs). For SMVP derivation, amaximum of four merge candidates are selected among candidates that arelocated in positions as depicted in FIG. 2. The order of derivation isA₁→B₁→B₀→A₀→(B₂). In HEVC, position B₂ is considered only when any PU ofposition A₁, B₁, B₀, A₀ is not available or is intra coded or the totalnumber of candidates, after pruning, from positions A₁, B₁, B₀, A₀ isless than four.

In the derivation of a TMVP, a scaled motion vector is derived based ona co-located PU belonging to one of the reference pictures of a currentpicture within a signaled reference picture list. The reference picturelist used for derivation of the co-located PU may be explicitly signaledin a slice header of a slice of the current picture. The scaled motionvector for temporal merge candidate may be obtained with the scaledmotion vector of the co-located PU using the POC distances, tb and td,where tb is defined to be the POC difference between the referencepicture of the current picture and the current picture and td is definedto be the POC difference between the reference picture of the co-locatedpicture and the co-located picture. The reference picture index of thetemporal merge candidate is set equal to zero. A practical realizationof the scaling process is described in the HEVC draft specification,which is available from https://www.itu.int/rec/T-REC-H.265. For aB-slice, two motion vectors, one for reference picture list 0 and theother for reference picture list 1, are obtained and combined to makethe bi-predictive merge candidate.

The position of the co-located PU is selected between two candidatepositions, C and H, as depicted in FIG. 2. If the PU at position H isnot available, or is intra coded, or is outside of a current CTU row(i.e., a CTU row that contains the current PU), position C is used.Otherwise, position H is used for the derivation of the temporal mergecandidate.

In addition to SMVPs and TMVPs, there may be two types of syntheticmerge candidates: (1) combined bi-predictive MVP and (2) zero MVP.Combined bi-predictive MVPs are generated by utilizing a SMVP and aTMVP. In HEVC, combined bi-predictive merge candidates are used forB-slices only. For example, two candidates in the original mergecandidate list, which have mvL0 and refIdxL0 or mvL1 and refIdxL1, areused to create a combined bi-predictive merge candidate. A zero MVP hasone or more motion vectors with magnitudes of 0.

In the process of candidate selection, duplicated candidates having thesame motion parameters as the previous candidate in the processing ordermay be removed from the candidate list. This process is defined as apruning process. Also, candidates inside the same merge estimationregion (MER) are not considered, in order to help parallel mergeprocessing. Redundant partition shapes are avoided in order to notemulate a virtual 2N×2N partition.

Between each step of generating a merge candidate in the merge candidatelist, the derivation process may be stopped if the number of mergecandidates reaches to MaxNumMergeCand. In HEVC and potentially othercodecs, MaxNumMergeCand is set equal to five. Since the number ofcandidates is constant, an index of a best merge candidate may beencoded using truncated unary binarization.

AMVP mode is similar to merge mode in that video encoder 20 may generatea candidate list and may select a candidate from the candidate list.However, for each respective reference block used in determining apredictive block for a current block (i.e., video unit), video encoder20 may signal a respective motion vector difference (MVD) for thecurrent block, a respective reference index for the current block, and arespective candidate index indicating a selected candidate in thecandidate list. An MVD for a block may indicate a difference between amotion vector of the block and a motion vector of the selectedcandidate. The reference index for the current block indicates areference picture from which a reference block is determined.

Furthermore, when AMVP mode is used, for each respective reference blockused in determining a predictive block for the current block, videodecoder 30 may determine an MVD for the current block, a reference indexfor the current block, and a candidate index and a motion vectorprediction (MVP) flag. Video decoder 30 may generate the same candidatelist and may determine, based on the candidate index, a selectedcandidate in the candidate list. As before, this list may include motionvectors of neighboring blocks that are associated with the samereference index as well as a temporal motion vector predictor which isderived based on the motion parameters of the neighboring block of theco-located block in a temporal reference picture. Video decoder 30 mayrecover a motion vector of the current PU by adding the MVD to themotion vector indicated by the selected AMVP candidate. That is, videodecoder 30 may determine, based on a motion vector indicated by theselected AMVP candidate and the MVD, the motion vector of the currentPU. Video decoder 30 may then use the recovered motion vector or motionvectors of the current PU to generate predictive blocks for the currentPU.

When a video coder (e.g., video encoder 20 or video decoder 30)generates an AMVP candidate list for a current PU, the video coder mayderive one or more AMVP candidates based on the motion information ofPUs (i.e., spatially-neighboring PUs) that cover locations thatspatially neighbor the current PU and one or more AMVP candidates basedon motion information of PUs that temporally neighbor the current PU. Inthis disclosure, a PU (or other type of video unit or block) may be saidto “cover” a location if a prediction block of the PU (or other type ofsample block of the video unit) includes the location. The candidatelist may include motion vectors of neighboring blocks that areassociated with the same reference index as well as a temporal motionvector predictor which is derived based on the motion parameters (i.e.,motion information) of the neighboring block of the co-located block ina temporal reference picture. A candidate in a merge candidate list oran AMVP candidate list that is based on the motion information of a PUthat temporally neighbors a current PU (i.e., a PU that is in adifferent time instance than the current PU) may be referred to as aTMVP. A TMVP may be used to improve the coding efficiency of HEVC and,different from other coding tools, a TMVP may need to access a motionvector of a frame in a decoded picture buffer, more specifically in areference picture list.

For the AMVP mode, an inter prediction indicator is transmitted todenote list 0 prediction, list 1 prediction, or bi-prediction. Next, oneor two reference indices are transmitted when there are multiplereference pictures. An index is transmitted for each predictiondirection to select one motion candidate from the candidate list. Asshown in FIG. 2, the candidate list for the inter mode includes twospatial motion candidates and one temporal motion candidate:

1. Left candidate (the first available from A₀, A₁)

2. Top candidate (the first available from B₀, B₁, B₂)

3. Temporal candidate (the first available from H and C)

In HEVC, a video coder searches for the left spatial motion candidatefrom the below left to the left (i.e., A₀ and A₁) and the video coderselects the first available one as the left candidate. The video codersearches for the top spatial motion candidate from the above right tothe above left (i.e. B₀, B₁ and B₂) and the video coder selects thefirst available one as the top candidate. The video coder may select atemporal motion candidate from a block (H or C) located in a referencepicture, which is termed a temporal collocated picture. The temporalcollocated picture is indicated by transmitting one flag in a sliceheader to specify which reference picture list and one reference indexin the slice header to indicate which reference picture in the referencelist is used as the collocated reference picture. In HEVC, after theindex is transmitted, one or two corresponding motion vector differences(MVDs) are transmitted.

Furthermore, in HEVC and potentially other codecs, a fixed candidatelist size is used to decouple the candidate list construction and theparsing of the index. In order to compensate for the coding performanceloss caused by the fixed list size, additional candidates are assignedto the empty positions in the candidate list. In this process, the indexis coded in truncated unary codes of a maximum length, where the maximumlength is transmitted in the slice header for the skip mode and mergemode and fixed to 2 for the inter mode. As described above, for the skipmode and merge mode, after the derivation and pruning of the fourspatial motion candidates and the one temporal motion candidate, if thenumber of available candidates is smaller than the fixed candidate listsize, additional synthetic candidates are derived and added to fill theempty positions in the merging candidate list. For the AMVP mode, a zerovector motion candidate is added to fill the empty positions in the AMVPcandidate list after the derivation and pruning of the two spatialmotion candidates and the one temporal motion candidate.

In the JEM reference software, there are several inter coding toolswhich derive and/or refine the motion vector (MV) for a current block atthe decoder side or utilize an affine motion model. These newinter-prediction approaches are elaborated below.

Pattern matched motion vector derivation (PMMVD) mode is a special mergemode based on Frame Rate Up-Conversion (FRUC) techniques. With the PMMVDmode, motion information of a block is not signaled, but is insteadderived at the decoder side. A FRUC flag is signaled for a block (e.g.,CU) when its merge flag is true. When the FRUC flag is false, a mergeindex is signaled and the regular merge mode is used. When the FRUC flagis true, an additional FRUC mode flag is signaled to indicate whichmethod (bilateral matching or template matching) is to be used to derivemotion information for the block.

At the encoder side, the decision on whether to use FRUC merge mode fora CU may be based on rate/distortion (RD) cost selection as is done fornormal merge candidates. That is, the two matching modes (bilateralmatching and template matching) may both be checked for a CU by using RDcost selection. The mode leading to the minimal cost is further comparedto other CU modes. If a FRUC matching mode is the most efficient mode,the FRUC flag is set to true for the CU and the related matching mode isused.

The motion derivation process in the FRUC merge mode includes two steps.A CU-level motion search may first be performed, followed by a sub-CUlevel motion refinement. At the CU level, an initial motion vector(i.e., a starting MV) is derived for the whole CU based on bilateralmatching or template matching. First, a list of MV candidates isgenerated (FRUC MV candidates) and the candidate which leads to theminimum matching cost is selected as a starting point for further CUlevel refinement. Then, a local search based on bilateral matching ortemplate matching around the starting point is performed and the MV thatresults in the minimum matching cost is taken as the MV for the wholeCU. Subsequently, the motion information is further refined at thesub-CU level with the derived CU motion vectors as the starting points.

For example, the following derivation process may be performed for a W×HCU motion information derivation, where W is width and H is height. Atthe first stage, a MV for the whole W×H CU is derived. At the secondstage, the CU is further split into M×M sub-CUs. The value of M iscalculated as in equation (1), below, D is a predefined splitting depthwhich is set to 3 by default in the JEM. Then, the MV for each sub-CU isderived.

$\begin{matrix}{M = {\max\left\{ {4,\ {\min\left\{ {\frac{M}{2^{D}},\frac{N}{2^{D}}} \right\}}} \right\}}} & (1)\end{matrix}$

As shown in the FIG. 3, the bilateral matching is used to derive motioninformation of a current CU by finding the best match between two blocksalong the motion trajectory of the current CU in two different referencepictures. Under the assumption of continuous motion trajectory, themotion vectors MV0 and MV1 pointing to the two reference blocks areproportional to the temporal distances, i.e., TD0 and TD1, between thecurrent picture and the two reference pictures. As a special case, whenthe current picture is temporally between the two reference pictures andthe temporal distance from the current picture to the two referencepictures is the same, the bilateral matching becomes mirror basedbi-directional MV.

As shown in FIG. 4, template matching is used to derive motioninformation of the current CU by finding the best match between atemplate (top and/or left neighboring blocks of the current CU) in thecurrent picture and a block (same size to the template) in a referencepicture. Except for the aforementioned FRUC merge mode, the templatematching is also applied to AMVP mode. In the JEM, like in HEVC, AMVPhas two candidates. With the template matching method, a new candidateis derived. If the newly derived candidate by template matching isdifferent from the first existing AMVP candidate, the newly derivedcandidate is inserted at the very beginning of the AMVP candidate listand then the list size is set to two (meaning remove the second existingAMVP candidate). When applied to the AMVP mode, only a CU-level searchis applied.

In a CU-level FRUC MV candidate set, the MV candidate set at theCU-level comprises or consists of:

-   -   (i) Original AMVP candidates if the current CU is in AMVP mode    -   (ii) all merge candidates,    -   (iii) several MVs in an interpolated MV field, which is        introduced elsewhere in this disclosure    -   (iv) top and left neighboring motion vectors

When using bilateral matching, each valid MV of a merge candidate isused as an input to generate a MV pair with the assumption of bilateralmatching. For example, one valid MV of a merge candidate is (MV_(a),ref_(a)) at reference list A. Then, the reference picture ref_(b) of itspaired bilateral MV is found in the other reference list B so thatref_(a) and ref_(b) are temporally at different sides of the currentpicture. If such a ref_(b) is not available in reference list B, ref_(b)is determined as a reference which is different from ref_(a) and itstemporal distance to the current picture is the minimal one in list B.After ref_(b) is determined, MV_(b) is derived by scaling MV_(a) basedon the temporal distance between the current picture and ref_(a),ref_(b).

Four MVs from the interpolated MV field may also be added to the CUlevel candidate list. More specifically, the interpolated MVs at theposition (0, 0), (W/2, 0), (0, H/2) and (W/2, H/2) of the current CU maybe added. When FRUC is applied in AMVP mode, the original AMVPcandidates may also be added to the CU-level MV candidate set. At the CUlevel, up to 15 MVs for AMVP CUs and up to 13 MVs for merge CUs areadded to the candidate list. In this disclosure, an AMVP CU is a CU inwhich motion information is predicted using an AMVP mode. Furthermore,in this disclosure, a merge CU is a CU in which motion information ispredicted using merge mode.

In some examples, the MV candidate set at the sub-CU level consists ofor comprises:

(i) a MV determined from a CU-level search,

(ii) top, left, top-left and top-right neighboring MVs,

(iii) scaled versions of collocated MVs from reference pictures,

(iv) up to 4 advanced temporal motion vector prediction (ATMVP)candidates,

(v) up to 4 spatial-temporal motion vector prediction (STMVP)candidates.

The scaled MVs from reference pictures may be derived as follows. Allthe reference pictures in both lists are traversed. The MVs at acollocated position of the sub-CU in a reference picture are scaled tothe reference of the starting CU-level MV. That is, like TMVPs in HEVC,the MVs at the collocated position may be scaled according to the POCdistance. ATMVP and STMVP candidates are limited to up to four ATMV andSTMVP candidates. At the sub-CU level, up to 17 MVs are added to thecandidate list.

As mentioned above, in a CU-level FRUC MV candidate set, the MVcandidate set at the CU level may include one or more MVs in aninterpolated MV field. Before coding a frame, the interpolated motionfield (i.e., interpolated MV field) is generated for the whole picturebased on unilateral motion estimation. The motion field may then be usedlater as CU level or sub-CU level MV candidates. First, the motion fieldof each reference picture in both reference lists may be traversed at a4×4 block level. FIG. 5 is an example of unilateral motion estimation inframe-rate up conversion. Picture 500 in FIG. 5 is a reference picturefor a current picture. The current picture has an output timecorresponding to the output time of picture 502. Picture 504 is areference picture for picture 500. A video coder uses motion vectors ofblocks in picture 500 that point to locations in picture 504 tointerpolate samples of the current picture. Picture 502 contains theresulting interpolated samples. In some examples, for each 4×4 block inpicture 500 of FIG. 5, if the motion associated to the 4×4 block passingthrough a 4×4 block in the current picture and the 4×4 block has notbeen assigned any interpolated motion, the motion of the reference blockis scaled to the current picture according to the temporal distance TD0and TD1 (the same way as that of MV scaling of TMVP in HEVC) and thescaled motion is assigned to the block in the current frame. If noscaled MV is assigned to a 4×4 block in the current frame, the motion ofthe block in the current frame is marked as unavailable in theinterpolated motion field. In other examples, other block sizes may beused.

When a motion vector points to a fractional sample position, motioncompensated interpolation may be needed. The motion compensatedinterpolation may interpolate sample values for locations between actualsamples of a picture from actual samples of the picture. To keep thecomplexity of motion compensated interpolation low, bi-linearinterpolation instead of regular 8-tap HEVC interpolation may be usedfor both bilateral matching and template matching. The calculation ofmatching cost is different at different steps. For instance, whenselecting the best candidate from candidate set at the CU level, thematching cost is the absolute sum difference (SAD) of bilateral matchingor template matching. After the starting MV is determined, the matchingcost C may be calculated using equation (2), below:C=SAD+w·(|MV_(x)−MV_(x) ^(s)|+|MV_(y)−MV_(y) ^(s)|)  (2)In equation (2), w is a weighting factor which is empirically set to 4,MV and MV^(s) indicate the current MV and the starting MV, respectively(MV_(x) and MV_(x) ^(s) being the horizontal components of the currentMV and the starting MV, respectively; MV_(y) and MV_(y) ^(s) being thevertical components of the current MV and the starting MV,respectively), and |⋅| indicates absolute value.

In some examples, in FRUC mode, a MV is derived by using luma samplesonly. In such examples, the derived motion may be used for both luma andchroma for motion compensation inter prediction. After the MV isderived, a final motion compensation is performed using an 8-tapinterpolation filter for luma and 4-taps interpolation filter forchroma.

MV refinement may include a pattern-based MV search with the criterionof bilateral matching cost or template matching cost. In the JEM, twosearch patterns are supported: (1) unrestricted center-biased diamondsearch (UCBDS), and (2) adaptive cross search for MV refinement at theCU level and the sub-CU level, respectively. For both CU level andsub-CU level MV refinement, the MV may be directly searched at quarterluma sample MV accuracy, which may then be followed by one-eighth lumasample MV refinement. The search range of MV refinement for both CU andsub-CU step may be set equal to 8 luma samples.

A video coder may select a prediction direction in template matchingFRUC merge mode as follows. In the bilateral matching merge mode,bi-prediction is always applied because the motion information of a CUis derived based on the best match between two blocks along the motiontrajectory of the current CU in two different reference pictures. In theJEM, there is no such limitation for the template matching merge mode.In the template matching merge mode, a video coder may select amonguni-prediction from list0, uni-prediction from list1 or bi-predictionfor a CU. The selection may be based on a template matching cost asfollows:

Sequence 1   If costBi <= factor × min (cost0, cost1),  bi-prediction isused;  Else If cost0 <= cost1,  uni-prediction from list0 is used; Else, uni-prediction from list1 is used;In the pseudocode of Sequence 1, above, cost0 is the SAD of list0template matching, cost1 is the SAD of list1 template matching andcostBi is the SAD of bi-prediction template matching. The value offactor is equal to 5/4, which means that the selection process is biasedto bi-prediction. In the JEM, the inter prediction direction selectionis only applied to CU-level template matching process.

In a bi-prediction template matching operation, for the prediction ofone block region, two prediction blocks, formed using a MV of list0 anda MV of list1, respectively, are combined to form a single predictionsignal. In the decoder-side motion vector refinement (DMVR) method, thetwo motion vectors of the bi-prediction are further refined by abilateral template matching process. The bilateral template matching maybe applied in video decoder 30 to perform a distortion-based searchbetween a bilateral template and the reconstruction samples in thereference pictures in order to obtain a refined MV without transmissionof additional motion information.

In DMVR, a bilateral template is generated as a weighted combination(i.e. average) of the two prediction blocks, from the initial MV0 oflist1 and MV1 of list1, respectively, as shown in FIG. 6. The templatematching operation may include or consist of calculating cost measuresbetween the generated bilateral template and the sample region (aroundthe initial prediction block) in the reference picture. For each of thetwo reference pictures, the MV that yields the minimum template cost maybe considered as the updated MV of that list to replace the originalone. The template cost may be calculated as the sum of absolutedifferences (SAD) or sum of squared differences (SSD) between thecurrent template and the reference samples. In the JEM, nine MVcandidates are searched for each list. The nine MV candidates includethe original MV and 8 surrounding MVs with one luma sample offset to theoriginal MV in either the horizontal or vertical direction, or both.Finally, the two new MVs, i.e., MV0′ and MV1′ as shown in FIG. 6, areused for generating the final bi-prediction results. A SAD may beutilized as the cost measure. FIG. 6 is a proposed DMVR based onbilateral template matching.

Thus, in the example of FIG. 6, a current block 600 in a current picture602 has a first motion vector 604 (MV0) and a second motion vector 606(MV1). Motion vector 604 points to a reference block 608 in a list0reference picture 610. Motion vector 606 points to a reference block 612in a list1 reference picture 614. Reference block 608 and referenceblock 612 may also be referred to herein as prediction blocks. Afteridentifying reference block 608 and reference block 612, a video codermay generate a predictive block 616 as a weighted average of referenceblock 608 and reference block 612. Predictive block 616 may also bereferred to herein as a bilateral template. Hence, in the example ofFIG. 6, the video coder may generate a bilateral template fromprediction blocks referred to by MV0 and MV1. Additionally, the videocoder may search in reference picture 610 for a block that best matchespredictive block 616. In the example of FIG. 6, the video coder hasidentified block 618 of reference picture 610 as the best match forpredictive block 616. The video coder may also search in referencepicture 614 for a block that best matches predictive block 616. In theexample of FIG. 6, the video coder has identified block 620 as the bestmatch for predictive block 616. A motion vector 622 (MV0′) indicates aspatial displacement between current block 600 and block 618. A motionvector 624 (MV1′) indicates a spatial displacement between current block600 and block 620.

DMVR may be applied for the merge mode of bi-prediction with one MV froma reference picture in the past and another from a reference picture inthe future, without the transmission of additional syntax elements. InJEM5, when local illumination compensation (LIC), affine motion, FRUC,or sub-CU merge candidate is enabled for a CU, DMVR is not applied.

In the JEM with QTBT, each CU can have at most one set of motion foreach prediction direction. Two sub-CU level motion vector predictionmethods are provided by splitting a large CU into sub-CUs and derivingmotion information for all the sub-CUs of the large CU. The advancedtemporal motion vector prediction (ATMVP) method allows each CU to fetchmultiple sets of motion information from multiple blocks smaller thanthe current CU in the collocated reference picture. In thespatial-temporal motion vector prediction (STMVP) method, motion vectorsof the sub-CUs are derived recursively by using the temporal motionvector predictor and spatial neighboring motion vector. To preserve amore accurate motion field for sub-CU motion prediction, the motioncompression for the reference frames is currently disabled in the JEM.

In the advanced temporal motion vector prediction (ATMVP) method, themotion vectors temporal motion vector prediction (TMVP) is improved byallowing each CU to fetch multiple sets of motion information (includingmotion vectors and reference indices) from multiple blocks smaller thanthe current CU. As shown in FIG. 7, the sub-CUs are square N×N blocks (Nis set to 4 by default).

The ATMVP predicts the motion vectors of the sub-CUs within a CU in twosteps. The first step is to identify the corresponding block in areference picture with a so-called temporal vector. The referencepicture is called the motion source picture. The second step is to splitthe current CU into sub-CUs and to obtain the motion vectors as well asthe reference indices of each sub-CU from the block corresponding toeach sub-CU, as shown in FIG. 7.

FIG. 7 shows ATMVP motion prediction for a current CU 700 in a currentpicture 702. In the first step, a reference picture 704 and acorresponding block 706 is determined by the motion information of thespatial neighboring blocks of current CU 700. Reference picture 704 mayalso be referred to as motion source picture 704 because a video coderuses motion source picture 704 as a source of motion information forcurrent CU 700 in current picture 702. To avoid the repetitive scanningprocess of neighboring blocks, the motion information of the first mergecandidate in a merge candidate list of current CU 700 is used todetermine reference picture 704 and corresponding block 706. The firstavailable motion vector as well as its associated reference index areset to be a temporal vector 708 and the index to the motion sourcepicture 704. This way, in ATMVP, corresponding block 706 may be moreaccurately identified, compared with TMVP, wherein the correspondingblock (sometimes called collocated block) is always in a bottom-right orcenter position relative to current CU 700.

In the second step, a corresponding block of a sub-CU of current CU 700is identified by temporal vector 708 in motion source picture 704, byadding temporal vector 708 to the (x, y) coordinates of current CU 700.For each sub-CU of current CU 700, the motion information of itscorresponding block (the smallest motion grid that covers the centerpixel) is used to derive the motion information for the sub-CU. Afterthe motion information of a corresponding N×N block is identified, themotion information of the corresponding N×N block is converted to themotion vectors and reference indices of the current sub-CU, in the sameway as TMVP, wherein motion scaling and other procedures apply. Forexample, video decoder 30 may check whether the low-delay condition isfulfilled and possibly uses motion vector MV_(x) (the motion vectorcorresponding to reference picture list X) to predict motion vectorMV_(y) (with X being equal to 0 or 1 and Y being equal to 1−X) for eachsub-CU. This is done in the same way as for temporal motion vectorprediction.

In spatial-temporal motion vector prediction, the motion vectors of thesub-CUs are derived recursively, following raster scan order. FIG. 8illustrates this concept. For example, consider an 8×8 CU (shown in FIG.8 as a square with a thicker outline) which contains four 4×4 sub-CUs A,B, C, and D, as shown in FIG. 8. The neighboring N×N blocks in thecurrent frame are labelled as a, b, c, and d in FIG. 8.

The motion derivation for sub-CU A starts by identifying its two spatialneighbors. The first neighbor is an N×N block above sub-CU A (block c).If block c is not available or is intra coded, the other N×N blocksabove sub-CU A are checked (from left to right, starting at block c).The second neighbor is a block to the left of the sub-CU A (block b). Ifblock b is not available or is intra coded, other blocks to the left ofsub-CU A are checked (from top to bottom, staring at block b). Themotion information obtained from the neighboring blocks for each list isscaled to the first reference frame for a given list. Next, a temporalmotion vector predictor (TMVP) of sub-block A is derived by followingthe same procedure of TMVP derivation as specified in HEVC and describedin this disclosure above. The motion information of the collocated blockat location D is fetched and scaled accordingly. At last, afterretrieving and scaling the motion information, all available motionvectors (up to 3) are averaged separately for each reference list. Theaveraged motion vector is assigned as the motion vector of the currentsub-CU.

In sub-CU motion prediction mode signaling, the sub-CU modes are enabledas additional merge candidates and there is no additional syntax elementrequired to signal the modes. Two additional merge candidates are addedto merge candidates list of each CU to represent the ATMVP mode andSTMVP mode. Up to seven merge candidates are used, if the sequenceparameter set indicates that ATMVP and STMVP are enabled. At encodinglogic of the additional merge candidates is same as the merge candidatesin the HEVC test model (HM), which means, for each CU in P or B slice,two more RD checks are needed for the two additional merge candidates.To improve the merge index coding, in the JEM, all bins of a merge indexare context coded by CABAC. While in HEVC, only the first bin is contextcoded and the remaining bins are context by-pass coded.

It may be computationally less expensive to perform bypass CABAC codingon a bin than to perform regular CABAC coding on the bin. Furthermore,performing bypass CABAC coding may allow for a higher degree ofparallelization and throughput. Bins encoded using bypass CABAC codingmay be referred to as “bypass bins.” Grouping bypass bins together mayincrease the throughput of video encoder 20 and video decoder 30. Thebypass CABAC coding engine may be able to code several bins in a singlecycle, whereas the regular CABAC coding engine may be able to code onlya single bin in a cycle. The bypass CABAC coding engine may be simplerbecause the bypass CABAC coding engine does not select contexts and mayassume a probability of ½ for both symbols (0 and 1). Consequently, inbypass CABAC coding, the intervals are split directly in half. However,compression efficiency may be diminished.

In HEVC, only a translation motion model is applied for motioncompensation prediction (MCP). In the real world, there are many kindsof motion, e.g. zoom in/out, rotation, perspective motions and the otherirregular motions. In the JEM, an affine transform motion compensationprediction is applied to improve the coding efficiency. If a blockfollows affine motion model, the MV of position (x, y) in the block canbe determined by the affine motion model:

$\begin{matrix}\left\{ \begin{matrix}{v_{x} = {{ax} + {by} + c}} \\{v_{y} = {{dx} + {ey} + f}}\end{matrix} \right. & (3)\end{matrix}$In equation (3), a, b, c, d, e and f are affine parameters. Furthermore,in equation (3), v_(x) is a horizontal component of the MV of position(x, y) and v_(y) is a vertical component of the MV of position (x, y).

FIG. 9 is a block diagram of a simplified affine motion model for acurrent affine block 900. As shown in FIG. 9, the 6-parameters affinemotion model can be represented by the motion vector v₀ of a top-leftcontrol point 902 (x₀, y₀), the motion vector v₁ of a top-right controlpoint 904 (x₁, y₁) and the motion vector v₂ of a bottom-left controlpoint 906 (x₂, y₂). With the assumption that top-left control point 902is the origin of the coordinate system, which means (x₀, y₀)=(0, 0), theMV of position (x, y) in current affine block 900 is described byequation (4), below:

$\begin{matrix}\left\{ \begin{matrix}{v_{x} = {{\frac{\left( {v_{1x} - v_{0_{x}}} \right)}{w}x} + {\frac{\left( {v_{2x} - v_{0\; x}} \right)}{h}y} + v_{0\; x}}} \\{v_{y} = {{\frac{\left( {v_{1y} - v_{0\; y}} \right)}{w}x} + {\frac{\left( {v_{2y} - v_{0\; y}} \right)}{h}y} + v_{0\; y}}}\end{matrix} \right. & (4)\end{matrix}$In equation (4), (v_(0x), v_(0y)) is the motion vector of top-leftcorner control point 902, (v_(1x), v_(1y)) is a motion vector oftop-right corner control point 904, (v_(2x), v_(2y)) is a motion vectorof bottom-left corner control point 906, w=(x₁−x₀) is the horizontaldistance between the top-left and top-right control points 902, 904, andh=(y₂−y₀) is the vertical distance between top-left and bottom-leftcontrol points 902, 906. In equation (4), v_(x) is a horizontalcomponent of the MV of position (x, y) and v_(y) is a vertical componentof the MV of position (x, y).

However, in the JEM, the affine motion model is simplified to a4-parameter affine motion model by assuming a=e and b=−d in equation(3), resulting in the expression of v_(x) and v_(y), as shown inequation (5), below:

$\begin{matrix}\left\{ \begin{matrix}{v_{x} = {{ax} - {by} + c}} \\{v_{y} = {{bx} + {ay} + f}}\end{matrix} \right. & (5)\end{matrix}$The 4-parameters affine motion model is then represented by the motionvector v₀ of top-left control point 902 (x₀, y₀) which is assumed as theorigin point and the motion vector v₁ of top-right control point 904(x₁, y₁). In equation (5), v_(x) is a horizontal component of the MV ofposition (x, y) and v_(y) is a vertical component of the MV of position(x, y). FIG. 10 is an example of a simplified affine motion model for acurrent affine block 1000. As shown in FIG. 10, the affine motion fieldof the block is described by two control point motion vectors, v₀ andv₁. The motion vector field (MVF) of a block is described by equation(6):

$\begin{matrix}\left\{ \begin{matrix}{v_{x} = {{\frac{\left( {v_{1x} - v_{0x}} \right)}{w}x} - {\frac{\left( {v_{1y} - v_{0y}} \right)}{w}y} + v_{0x}}} \\{v_{y} = {{\frac{\left( {v_{1y} - v_{0y}} \right)}{w}x} + {\frac{\left( {v_{1x} - v_{0x}} \right)}{w}y} + v_{0y}}}\end{matrix} \right. & (6)\end{matrix}$In equation (6), (v_(0x), v_(0y)) is a motion vector of top-left cornercontrol point 1002, (v_(1x), v_(1y)) is a motion vector of a top-rightcorner control point 1004 and w−(x₁−x₀) is the horizontal distancebetween the top-left and top-right control points 1002, 1004. v_(x) is ahorizontal component of the MV of position (x, y) and v_(y) is avertical component of the MV of position (x, y).

In order to further simplify the motion compensation prediction,block-based affine transform prediction may be applied. To derive amotion vector of each sub-block, the motion vector of a center sample ofeach sub-block, as shown in FIG. 11, is calculated according to equation(6), and rounded to 1/16 fraction accuracy. A video coder may then applymotion compensation interpolation filters to generate the prediction ofeach sub-block with the derived motion vector. The interpolated motionvectors for each sub-block within the affine block is named as MCPmotion vector field (MVF) in the following context. The sub-block sizecan vary depending on the MV difference between control points. FIG. 11is an example MCP MV field, where the MV of each sub-block (e.g., 4×4block) is interpolated by the MVs of the control points; the MV is thenused to perform motion compensation prediction (MCP) for each sub-block.The motion vector of each sub-block may be used to identify acorresponding reference block, the combination of which form apredictive block. Thus, in this way, a video coder may generate apredictive block based on a motion vector of a block (e.g., a motionvector of a control point of the block).

After motion compensation prediction, the high accuracy motion vector ofeach sub-block is rounded and saved as the same accuracy as the normalmotion vector. In the JEM and in HEVC, the motion vectors for each interprediction CU or PU are stored for the MV prediction of the other interblocks. The store unit for motion vectors is a 4×4 block. In otherwords, in the JEM, the interpolated MVs of an affine block are generatedand stored for each 4×4 block. However, since the MVs of the controlpoints may be used for the following blocks, the stored MVs for thecorner 4×4 blocks are the MVs of the control points instead of theassociated MVs used for MCP as shown in FIG. 12. Note that, in JEM6, theMVs of the bottom-left and bottom-right control points are alsogenerated by the MVs of the top-left and top-right control points.

Thus, in FIG. 12, a CU 1200 includes sixteen sub-blocks. For eachrespective sub-block of the twelve sub-blocks not at the corners of CU1200, a video coder stores the motion vector(s) for the center point ofthe respective sub-block. For each respective sub-block at a corner ofCU 1200, the video coder stores the motion vector(s) for the outercorner of the respective sub-block.

In the JEM, there are two affine motion modes: affine inter (AF_INTER)mode and affine merge (AF_MERGE) mode. For CUs with both width andheight larger than 8, AF_INTER mode can be applied. An affine flag atthe CU level is signaled in the bitstream to indicate whether AF_INTERmode is used. In this mode, a candidate list with motion vector set{(MVP₀,MVP₁)|MVP₀={v_(A), v_(B), v_(C)}, MVP₁={v_(D),v_(E)}} isconstructed using the neighbor blocks. As shown in FIG. 13, MVP₀ isselected from the motion vectors of the block A, B or C. FIG. 13illustrates an example of MVP for AF_INTER. The motion vector from theneighbor block is scaled according to the reference list and therelationship among the Picture Order Count (POC) of the reference forthe neighbor block, the POC of the reference for the current CU and thePOC of the current CU. The approach to select MVP₁ from the neighborblock D and E is similar. In the JEM, if the number of candidates in thecandidate list is smaller than 2, the list is padded by the motionvector pair composed by duplicating each of the AMVP candidates {AMVP₀,AMVP₀} and {AMVP₁, AMVP₁}.

Furthermore, in the JEM, when the number of candidates in the candidatelist is larger than 2, the candidates are firstly sorted according tothe consistency of the neighboring motion vectors (similarity of the twomotion vectors in a pair candidate) and only the first two candidatesare kept as shown in the right part of FIG. 13. A video coder may use arate-distortion (RD) cost check is used to determine which motion vectorset candidate is selected as the control point motion vector prediction(CPMVP) of the current CU. An index indicating the position of the CPMVPin the candidate list is signaled in the bit stream. After the CPMVP ofthe current affine CU is determined, affine motion estimation is appliedand the control point motion vector (CPMV) is found. The difference ofthe CPMV and the CPMVP may then be signaled in the bitstream.

When a CU is applied in affine merge (AF_MERGE) mode, the CU gets thefirst block coded with affine mode from the valid neighbor reconstructedblocks based on the visiting order: A1→B1→B0→A0→B2. The selection orderfor the candidate block is from left, above, above-right, left-bottom toabove-left as shown in FIG. 14A. If the neighbor left bottom block A iscoded in affine mode as shown in FIG. 14B, the motion vectors v₂, v₃ andv₄ of the top left corner, above right corner and left bottom corner ofthe CU which contains the block A are derived. The motion vector v₀ ofthe top left corner on the current CU is extrapolated according to v₂,v₃ and v₄ using equation (7), below, by assuming (x₂, y₂) is the originpoint which means (x₂, y₂)=(0, 0). Secondly, the motion vector v₁ of theabove right of the current CU is calculated in a similar way. Equation(7) is shown below.

$\begin{matrix}\left\{ \begin{matrix}{v_{x} = {{\frac{\left( {v_{3x} - v_{2x}} \right)}{w}x} + {\frac{\left( {v_{4x} - v_{2x}} \right)}{h}y} + v_{2x}}} \\{v_{y} = {{\frac{\left( {v_{3y} - v_{2y}} \right)}{w}x} + {\frac{\left( {v_{4y} - v_{2y}} \right)}{h}y} + v_{2y}}}\end{matrix} \right. & (7)\end{matrix}$In equation (7), (v_(2x), v_(2y)) is motion vector of the top-leftcorner control point (x₂, y₂), (v_(3x), v_(3y)) is motion vector of thetop-right corner control point (x₃, y₃), (v_(4x), v_(4y)) is motionvector of the bottom-left corner control point (x₄, y₄) in the neighboraffine block, w=(x₃−x₂) is the horizontal distance between the top-leftand top-right control points, and h=(y₄−y₂) is the vertical distancebetween the top-left and bottom-left control points, v_(x) is thehorizontal component of the motion vector for location (x, y), and v_(y)is the vertical component of the motion vector for location (x, y).

After the CPMV of the current CU v₀ and v₁ are derived, according to theaffine motion model equation (6), the MVF of the current CU isgenerated. In order to identify whether the current CU is coded withAF_MERGE mode, an affine flag is signaled in the bitstream when there isat least one neighbor block coded in affine mode.

In HEVC, Motion Vector Differences (MVDs) (between the motion vector andpredicted motion vector of a PU) are signaled in unit of quarter lumasample. In the JEM, Advanced Motion Vector Resolution (AMVR) isintroduced. In JEM5, an MVD can be coded in units of quarter lumasamples, integer luma samples or four luma samples. In JEM5, the MVDresolution is controlled at the CU level and MVD resolution flags areconditionally signaled for each CU that has at least one non-zero MVDcomponents.

For a CU that has at least one non-zero MVD components, a first flag issignaled to indicate whether quarter luma sample MV precision is used inthe CU. When the first flag (equal to 1) indicates that quarter lumasample MV precision is not used, another flag is signaled to indicatewhether integer luma sample MV precision or four luma sample MVprecision is used.

When the first MVD resolution flag of a CU is zero, or not coded for aCU (meaning all MVDs in the CU are zero), the quarter luma sample MVresolution is used for the CU. When a CU uses integer-luma sample MVprecision or four-luma-sample MV precision, the MVPs in the AMVPcandidate list for the CU are rounded to the corresponding precision.

At the encoder side, video encoder 20 may use CU level RD checks todetermine which MVD resolution is used for a CU. That is, the CU levelRD check may be performed three times, respectively, for each MVDresolution. To accelerate encoder speed, the following encoding schemesare applied in the JEM:

-   -   During an RD check of a CU with normal quarter luma sample MVD        resolution, the motion information of the current CU (integer        luma sample accuracy) is stored. The stored motion information        (after rounding) is used as the starting point for further small        range motion vector refinement during the RD check for the same        CU with integer luma sample and 4 luma sample MVD resolution so        that the time-consuming motion estimation process is not        duplicated three times.    -   An RD check of a CU with 4 luma sample MVD resolution is        conditionally invoked. For a CU, when the RD cost for integer        luma sample MVD resolution is much larger than that of quarter        luma sample MVD resolution (e.g., the ratio of the RD cost for        integer luma sample MVD resolution to the RD cost for quarter        luma sample MVD resolution is greater than a threshold), the RD        check of 4 luma sample MVD resolution for the CU is skipped.

The reconstructed motion vector information is not fully utilized in theexisting schemes of motion vector prediction in the existing video codecsuch as HEVC/H.265, AVC/H.264, and the JEM.

This disclosure describes techniques that may improve computing devicesthat perform motion vector prediction (MVP). The techniques areelaborated in several different aspects described below. The followingtechniques may be applied individually. Alternatively, any combinationof the techniques may be applied.

In accordance with one or more techniques of this disclosure, videocoders may use motion vectors of blocks which are not immediatelyadjacent to a current block because the motion vectors of thenon-adjacent blocks can further improve prediction efficiency,especially when the correlation between the spatial motion vectors isstrong enough for the motion information of the current block to besimilar to that of the non-adjacent blocks. Thus, the motion informationfrom the non-adjacent blocks may be good MVP candidates for the currentblock. In this disclosure, it is proposed that one or more non-adjacentspatial motion vector predictors (NA-SMVPs) are used to derive themotion vector predictor for the motion information of current block; orthe NA-SMVPs may be directly re-used by the current block to performinter-prediction. This disclosure describes techniques to adaptivelyincorporate the NA-SMVPs together with the other MV predictors (e.g.,regular SMVP, TMVP, synthetic MVPs) for MV prediction.

Thus, in accordance with a technique of this disclosure, video encoder20 may determine a motion vector of a non-adjacent block of a currentpicture of the video data. The non-adjacent block is non-adjacent to acurrent block of the current picture. Furthermore, video encoder 20 maydetermine, based on the motion vector of the non-adjacent block, an MVPfor the current block. Video encoder 20 may also determine a motionvector of the current block. The motion vector may be equal to a motionvector of the MVP for the current block or may be equal to the motionvector of the MVP for the current block plus a motion vector difference(MVD) signaled in a bitstream. Additionally, video encoder 20 maydetermine a predictive block based on the motion vector of the currentblock. Video encoder 20 may generate, based on the predictive block,residual sample values.

Similarly, video decoder 30 may determine a motion vector of anon-adjacent block of a current picture of the video data. Thenon-adjacent block is non-adjacent to a current block of the currentpicture. Furthermore, video decoder 30 may determine, based on themotion vector of the non-adjacent block, an MVP for the current block.Additionally, video decoder 30 may determine, based on the MVP for thecurrent block, a motion vector of the current block. Video decoder 30may also determine a predictive block based on the motion vector of thecurrent block. Video decoder 30 may then reconstruct, based on thepredictive block, sample values of the current picture.

In some examples, the non-adjacent spatial motion vector predictors(NA-SMVP) are derived from the motion information of the spatiallynon-adjacent blocks located within the same picture, slice or apre-defined region in which the current block is located. Because themotion information of the non-adjacent blocks may be re-used as motionvector predictors for the current block, only the non-adjacent blockswhich have motion information reconstructed are considered fornon-adjacent MVP derivation. This disclosure proposes further adding aconstraint to the NA-blocks to constrain a distance between theNA-blocks and the current block to be within a range. The distance canbe measured in pixel distance in the L1 or L2 sense; or the distance canbe measured in block distance in the L1 or L2 sense. L1 distance betweentwo coordinate points in an n-dimensional real vector space with a fixedCartesian coordinate system is the sum of the lengths of the projectionsof the line segment between the points onto the coordinate axes. In thecase of L1 pixel distance, the length of a projection is the height orwidth of one pixel. In the case of L1 block distance, the length of aprojection is a width or height of a block. The L2 distance is theEuclidean distance between two points. The distance can be measuredbetween the block centers or any designated point within each block. Insome examples, another constraint is added to the NA-blocks whichconstrains the NA-blocks to be the blocks that are not adjacent to thecurrent block and are not adjacent to the blocks which are immediatelyadjacent to the current block.

FIG. 15 is a block diagram illustrating example non-adjacent blocks, inaccordance with a technique of this disclosure. As shown in FIG. 15, thenon-adjacent blocks 1500 are reconstructed blocks that are notimmediately adjacent to a current block 1502. The size of thenon-adjacent blocks can be defined as the smallest unit block used tostore the motion information (e.g. 4×4 block) or the basic unit forinter-prediction (e.g. PU in HEVC) or the sub-block as used in affinemode, FRUC mode in the JEM or any other specified block size. FIG. 15also shows adjacent, non-reconstructed blocks 1504 and non-adjacent,non-reconstructed blocks 1506.

FIG. 16 is block diagram illustrating an example of a selection ofnon-adjacent blocks, in accordance with a technique of this disclosure.FIG. 17 is a block diagram illustrating an example of a selection ofnon-adjacent blocks based on a parent block in accordance with atechnique of this disclosure. Although potentially all non-adjacentblocks can be used for MVP derivation, it may be more desirable (interms of implementation complexity) to select only a limited number ofnon-adjacent blocks (NA-blocks) for MVP derivation. Several ways toselect N (where N is a non-negative integer) non-adjacent blocks formotion vector predictor (MVP) derivation are elaborated below. Forinstance, in one example of selecting N non-adjacent blocks for MVPderivation, fixed patterns of non-adjacent blocks are selected forNA-SMVP derivation. The fixed patterns are positioned relative to theposition of current block. In one example as shown in FIG. 16, besidesthe adjacent blocks (e.g. A₀, A₁, B₀, B₁ and B₂) used to derive theregular SMVPs as used in HEVC for a current block 1600, a fixed patternof 11 NA-blocks (NA_(1,1), NA_(1,2), NA_(1,3), NA_(1,4), NA_(1,5),NA_(1,6), NA_(1,7), NA_(1,8), NA_(1,9), NA_(1,10), NA_(1,11)) whichsurround current block 1600 are used to derive the NA-SMVPs. Thehorizontal distance s₁ and the vertical distance t₁ are two descriptorsof this pattern.

In another example as shown in FIG. 17. In the example of FIG. 17,besides the adjacent blocks used to derive the regular SMVPs as used inHEVC, a video coder uses the adjacent block of a parent block 1700 whichcontains a current block 1702 as the NA-blocks for MVP derivation. InFIG. 17, the adjacent blocks (NA_(1,1), NA_(1,2), NA_(1,3), NA_(1,4),NA_(1,5), NA_(1,6), NA_(1,7), NA_(1,8), NA_(1,9)) of parent block 1700are selected as the non-adjacent blocks for the blocks within parentblock 1700, including current block 1702. The size of parent block 1700can be pre-determined or signaled in the bitstreams or dependent on thesize of current block 1702 or dependent on the coded mode (e.g.,skip/merge/AMVP) of current block 1702. The NA-SMVPs of this disclosurecan be derived from but not limited to the disclosed patterns ofnon-adjacent spatial blocks.

Examples of multi-level surrounding NA-blocks are given as follows. Itis noted that for each level, the number of NA-blocks may be different.

Pattern A1: Multi-level surrounding NA-blocks. Each level (level i) isdescribed by the distance parameters (s_(i) and t_(i)). FIG. 20, FIG. 21and FIG. 22 shows examples of 2-level surrounding NA-blocks but thenumber of levels can be any non-negative integer. In the examples ofFIG. 20, FIG. 21, and FIG. 22, the black squares correspond to NA-blocksin a first level and the gray squares correspond to NA-blocks in asecond level. t₁ denotes a vertical distance from a current block 2000,2100, or 2200 to the first level. t₂ denotes a vertical distance fromcurrent block 2000, 2100, or 2200 to the second level. s₁ denotes ahorizontal distance from current block 2000, 2100, or 2200 to the firstlevel. s₂ denotes a horizontal distance from current block 2000, 2100,or 2200 to the second level.

Pattern A2: Multi-level surrounding NA-blocks based on a parent block.Each level (level i) is described by the distance parameters (s_(i) andt_(i)). The size of the parent block can be pre-determined or signaledin the bitstreams. FIG. 23 shows examples of 2-level surroundingNA-blocks but the number of levels can be any non-negative integer.

Furthermore, in some examples, a distance between the current block andthe non-adjacent block is defined by a L1-norm (i.e., the L1 distance)or a L2-norm (i.e., the Euclidean distance).

In some examples, video encoder 20 and video decoder 30 select Nnon-adjacent blocks according to reverse coding order. For example, avideo coder (e.g., video encoder 20 or video decoder 30) may selectnon-adjacent blocks by scanning blocks according to an order that isopposite an order in which the video coder coded the blocks.

In some examples, video encoder 20 and video decoder 30 construct aglobal MV candidate list by inserting all the reconstructed MVs intothis list according to a pre-defined order. The global MV candidate listmay contain the MVs derived from the adjacent blocks as well as the MVsderived from non-adjacent blocks. The MV predictor of the current blockmay be then derived using this global MV candidates. Thus, in suchexamples, a video coder (e.g., video encoder 20 or video decoder 30) maydetermine a global motion vector candidate list that comprises MVPcandidates specifying a motion vector for each block that is in thecurrent picture and that is encoded prior to the current block.Additionally, the video coder may determine the motion vector of thenon-adjacent block from a MVP candidate in the global motion vectorcandidate list.

In some examples, because directly fetching non-adjacent MV candidatesmay increase the size of line buffer, a video coder applies analternative way to store reconstructed MVs. For instance, the videocoder may store reconstructed MVs in a history buffer in a first-in andfirst-out, fashion. To mimic the non-adjacent MV candidates, only thoseold MVs in the history buffer are taken as non-adjacent MV candidates.The old MVs in the history buffer may be defined as those close to theend of the history buffer. For example, if the size of the historybuffer is N, a threshold T (such as T=N/4) may be signaled or set sothat the T closest MVs to the exit in the history buffer are defined asold MVs.

In some examples, to reduce buffer size of a buffer used to storenon-adjacent motion information (i.e., motion information ofnon-adjacent blocks), constraints are added to derive non-adjacentspatial motion vector predictors. If the distance between a non-adjacentblock and the current block (or the current CTU) is larger than athreshold, the position of the non-adjacent block can be modified. Inother words, rather than determining a MV candidate based on a NA-blockat a first location (e.g., a location specified by a fixed pattern ofNA-blocks), a video coder may determine a second position based on thefirst position when a distance from the first position to the currentblock is greater than a threshold. In some examples, rather thandetermining a MV candidate based on a NA-block at a first location(e.g., a location specified by a fixed pattern of NA-blocks), a videocoder may determine the first position is not valid when a distance fromthe first position to the current block is greater than a threshold. Thethreshold can be different for horizontal distance and verticaldistance. Thus, in some examples, prior to determining the motion vectorof the non-adjacent block and based on a distance between thenon-adjacent block and the current block being greater than a thresholddistance, a video coder may modify a position of the non-adjacent block.In some examples, prior to determining the motion vector of anon-adjacent block and based on a distance between the non-adjacentblock and a current coding tree block being greater than a thresholddistance, the video coder may modify a position of the non-adjacentblock. In such examples, the current coding tree block contains thecurrent block.

One example of position modification can be rounding the first positionto a coarse grid, i.e., reducing stored non-adjacent motions. Thus, inthis example, a video coder may modify the position of the non-adjacentblock at least in part by rounding a position of the non-adjacent blockto a position on a first grid of blocks in the current picture coarserthan a second grid of blocks in the current picture.

Another example of position modification can be clipping the firstposition to the threshold if the distance to the position is larger thanthe threshold. Clipping the position to the threshold means modifyingthe position to be at the threshold if the position is past thethreshold. Thus, in this example, the video coder may modify theposition of the non-adjacent block at least in part by clipping aposition of the non-adjacent block to the distance threshold. Multipleposition modification methods with different thresholds can be combined.

FIG. 18A and FIG. 18B are block diagrams illustrating an example ofposition modification of a non-adjacent block in accordance with atechnique of this disclosure. FIG. 19A and FIG. 19B are block diagramsillustrating examples of thresholds for modifying non-adjacent block inaccordance with a technique of this disclosure. Several examples ofmodifying the positions are provided below. In these examples, assumethe position of a non-adjacent block is (xNA, yNA), the modifiedposition of the non-adjacent block is (xNA′, yNA′), the position oftop-left grid of a current CTU 1800, 1900 is (xCTU, yCTU), and theposition of the current CU is (xCU, yCU). Examples of constraints canbe:

-   -   1. If (yCTU−yNA)>(or >=) yThrd, yNA′=yThrd. If        (xCTU−xNA)>(or >=) xThrd, xNA′=xThrd. yThrd can be smaller than        xThrd. FIG. 18A shows an example with yThrd, where Thrd is an        abbreviation for threshold. Thus, in FIG. 18A, a CTU 1800        contains a current CU (curr) 1802. If the difference between a        vertical coordinate of a position NA 1804 of a non-adjacent        block and a vertical coordinate of CTU 1800 is greater than the        threshold (yThrd), the video coder clips the vertical coordinate        of position NA 1804 to the threshold, resulting in the position        NA′ 1806.    -   2. If (yCTU−yNA)>(or >=) yThrd and (or) (xCTU−xNA)>(or >=)        xThrd, abs(xNA′,        yNA′)=((xNA>>CompressedLog2SizeX)<<CompressedLog2SizeX,        (yNA>>CompressedLog2SizeY)<<CompressedLog2SizeY).        CompressedLog2SizeX and CompressedLog2SizeY are values for        controlling position rounding. For example, if (xNA, yNA) is        (36, 18) and (CompressedLog2SizeX, CompressedLog2SizeY) is        (4,4), the rounded position, (xNA′, yNA′), will be ((36>>4)<<4,        (18>>4)<<4)=(32,16). In other words, if a position of a        non-adjacent block is far from the current block, the video        coder may round the position to a coarser grid. Thus, the motion        buffer can only store non-adjacent block motions on the coarser        grid. FIG. 18B shows an example. Thus, in the example of FIG.        18B, a CTU 1850 contains a current CU (curr) 1852. If the        difference between a vertical (y) coordinate of a position NA        1854 and a vertical coordinate of a position of CTU 1850 is        greater than a vertical threshold (yThrd) and/or a different        between a horizontal (x) coordinate of position NA 1854 is        greater than a horizontal threshold (xThrd), the video coder may        determine a horizontal coordinate of a modified position NA′        1856 to (xNA>>CompressedLog2SizeX)<<CompressedLog2SizeX and a        vertical coordinate of the modified position NA′ 1856 to        (yNA>>CompressedLog2SizeY)<<CompressedLog2SizeY. In some        examples, xThrd is negative infinity. Thus, in such examples        (xCTU−xNA) is always larger than xThrd.    -   3. In some examples, the threshold of modifying a non-adjacent        block is: if (yCTU−yNA)>yThrd, the non-adjacent block is        modified. FIG. 19A shows an example, and shaded blocks are the        non-adjacent block positions that should be modified.        Particularly, in the example of FIG. 19A, a CTU 1900 includes a        current CU (curr) 1902. If a vertical coordinate of a        non-adjacent block differs from a vertical coordinate of CTU        1900 by more than the threshold (yThrd), the video coder may        modify the position of the non-adjacent block.    -   4. The threshold of modifying a non-adjacent block can be a        combination of more than one rule. An example can be that: (1)        if (yCTU−yNA)>yThrd, the non-adjacent block should be        modified. (2) if (yCTU−yNA)>0 and (xCTU−xNA)>0, the non-adjacent        block should be modified. FIG. 19B shows the example of        combination of the two rules, and shaded blocks are the        non-adjacent block positions that should be modified.        Particularly, in the example of FIG. 19B, a CTU 1950 includes a        current CU (curr) 1952. If a vertical coordinate of a        non-adjacent block differs from a vertical coordinate of CTU        1950 by more than a vertical threshold (yThrd), the video coder        may modify the vertical coordinate of the non-adjacent block.        Additionally, if the difference between a horizontal coordinate        of the non-adjacent block and a horizontal coordinate of CTU        1950 is greater than 0 and the difference between a vertical        coordinate of the non-adjacent block and the vertical coordinate        of CTU 1950 is greater than 0, the video coder may modify the        horizontal coordinate of the non-adjacent block.        In one example, only the non-adjacent blocks that are located at        the same CTU row as the current block can be selected. In        another example, only the non-adjacent blocks that are located        at the same CTU as the current block can be selected.

After the video coder determines the N non-adjacent blocks aredetermined, the video coder may derive M (where M≤N) non-adjacentspatial motion vector predictors (NA-SMVP) from the N non-adjacentblocks (NA-blocks). There are different ways to utilize the non-adjacentSMVPs depending on the inter-prediction mechanism used in the videocodec. For instance, when a competitive motion candidate mechanism(e.g., the merge/skip mode in HEVC or JEM) is used, one or morenon-adjacent spatial MVPs (NA-SMVPs) are derived and inserted into acandidate list according to a pre-defined order. In one example as shownin FIG. 16, the 11 non-adjacent MVPs are inserted into the mergingcandidate list after the conventional spatial MVPs, temporal MVPs andbefore the synthetic combined candidates, synthetic zero candidates.

In some examples, a full motion pruning process can be applied to theNA-SMVPs and the other merging candidates; or a partial motion pruningcan be applied to the NA-SMVPs and the other merging candidates. Thefull motion pruning process compares one candidate against all thepreviously derived candidates in the current candidate list to avoidinserting identical candidate to a certain extent. To reduce thecomplexity, the partial motion pruning process compares only limitednumbers of candidates instead of comparing each potential candidate withall the other existing candidates. More insertion orders of non-adjacentblocks are given in Sequence 2 through Sequence 5, below. The NA-SMVPsof this disclosure can be inserted into the candidate list including butnot limited to the disclosed insertion order.

Sequence 2 Insertion order for Merge mode: 1. Regular SMVPs (e.g. A₁,B₁, B₀, A₀, B₂) → TMVP (e.g. H or C) → NA-SMVPs→ Synthetic Candidates 2.Regular SMVPs (e.g. A₁, B₁, B₀, A₀, B₂) → Sub-block MV candidates (e.g.ATMVP, STMVP) → TMVP (e.g. H or C) → NA-SMVPs→ Synthetic Candidates 3.Regular SMVPs (e.g. A₁, B₁, B₀, A₀, B₂) → NA-SMVPs → TMVP (e.g. H or C)→ Synthetic Candidates

Sequence 3 Insertion order for AMVP mode (for List0 or List1 MVprediction): 1. Left SMVPs (e.g. A₀, A₁)→ Scaled Left SMVPs (e.g. A₀,A₁) → Above SMVPs (e.g. B₀, B₁, B₂) → Scaled Above SMVPs (e.g. B₀, B₁,B₂) → NA-SMVPs→ Scaled NA-SMVPs → TMVP → Synthetic Candidates

Sequence 4 Insertion order for Affine Merge mode: 1. Regular SMVPs (e.g.A₁, B₁, B₀, A₀, B₂) → NA-SMVPs

Sequence 5 Insertion order for Affine AMVP mode: 1. Extrapolated affineMVP → Left SMVPs (e.g. A₀, A₁)→ Scaled Left SMVPs (e.g. A₀, A₁) → AboveSMVPs (e.g. B₀, B₁, B₂) → Scaled Above SMVPs (e.g. B₀, B₁, B₂) →NA-SMVPs→ Scaled NA-SMVPs → TMVP →Synthetic Candidates

A competitive spatial-temporal motion candidate scheme may include asystem in which a motion predictor is selected from a set of availablemotion predictors. When a competitive spatial-temporal motion candidatescheme is used, such as the AMVP mode in HEVC or the JEM or other videocodecs, non-adjacent MVP candidates are derived and inserted into thecandidate list according to a pre-defined order. In one example, a videocoder inserts the 11 non-adjacent MVP of FIG. 16 into the AMVP candidatelist after the conventional spatial MVPs, temporal MVPs and before anysynthetic zero candidates. The NA-SMVP derivation can follow the samederivation rules as HEVC or any other rules applied to the SMVP derivedfrom adjacent blocks.

The order of NA-SMVP candidates can be determined either by a certainpre-defined rule or may be determined in an adaptive way. For example,the video coder may arrange M candidates from N non-adjacent blocks inthe same order that the N NA-blocks are selected in accordance with anyof the examples provided elsewhere in this disclosure. Alternatively, inone example, the video coder reorders the M candidates according tofrequencies of those candidates (i.e., the number of occurrences of thecandidates among all the MV candidates) and/or distances between aNA-block and the current block. Thus, in this example, the video codermay place more frequent candidates and/or candidates from NA-blockscloser to the current block ahead in an NA-SMVP candidate list (i.e.,the candidate list which includes NA-SMVP candidates and possibly othercandidates). In addition, the video coder may insert all the NA-SMVPcandidates in a fixed position in the candidate list as described inSequence 2 through Sequence 5, above, which are allowed to be re-orderedamong only NA-SMVP candidates. In another example, the video coder mayreorder all the candidates in the list (including NA-SMVP and othercandidates) according to certain criteria such as the frequency ofmotion information (i.e., the number of occurrences of the motion vectoramong all the MV candidates) or any available motion statistics from thecurrent picture and/or previously-coded pictures. The order of theNA-SMVPs in a candidate list can be different for certain coding modes,e.g. the merge and/or AMVP mode, and are not necessarily limited to thedisclosed candidate orders. For instance, a video coder may insertNA-SMVP candidates into a merge candidate list according to a firstorder and may insert NA-SMVP candidates into an AMVP candidate listaccording to a second order different from the first order.

In some examples, the pruning process is adaptive to the block size. Inone example, a threshold value can be used to define what needs to bepruned. For example, if the block size is large (i.e., larger than apredefined block size), then the video coder may increase the thresholdvalue accordingly. Consider two candidates with motion vectors MV0(added to the list earlier) and MV1, in one example, if the L1 or L2norm of the distance between MV0 and MV1 is smaller than the thresholdvalue, the video coder prunes the candidate of MV1. Video encoder 20 maysignal the threshold value signaled through an SPS, a PPS, a sliceheader, or in another syntax structure.

In another example, the threshold value is adaptive based on the currentblock size. For instance, in this example, a first threshold valueapplies for blocks having sizes less than a predefined block size and asecond, different threshold value applies for blocks having sizesgreater than the predefined block size. In this example, when generatinga candidate list for a block having a size less than the predefinedblock size, the video coder may prune a candidate from the list if an L1or L2 norm of the distance between the motion vector of the candidateand a motion vector of another candidate in the list is less than thefirst threshold value. In this example, when generating a candidate listfor a block having a size greater than the predefined block size, thevideo coder may prune a candidate from the list if an L1 or L2 norm ofthe distance between the motion vector of the candidate and a motionvector of another candidate in the list is less than the secondthreshold value.

In another example pruning process, the threshold value is adaptivebased on a distance between a candidate's spatial position and a spatialposition of the current block. The video coder may use a largerthreshold value if the candidate is located farther away from thecurrent block. For example, when generating a candidate list for thecurrent block, a video coder may determine a first NA-SMVP based on aparticular non-adjacent block. In this example, the video coder mayprune the first NA-SMVP candidate from the list if an L1 or L2 norm ofthe distance between a motion vector of the first NA-SMVP candidate anda motion vector of a second candidate in the list is less than aparticular threshold. In this example, the particular threshold may bedependent on a distance between the particular non-adjacent block andthe current block.

In some examples, classification of motion vectors can be done usingmethods including but not limited to K-mean or support vector machine,and only the first M_(c) candidates from each of the N_(c) classesshould be kept in the candidate list, where M_(c) and the number ofclasses N_(c) can be pre-defined or signaled in high-level syntax.

In schemes where only a single MVP is used, such as the affine mergemode in the JEM, a video coder (e.g., video encoder 20 or video decoder30) may also include one or more non-adjacent SMVPs (NA-SMVP) in acandidate set along with the other MVPs. The final MVP is then selectedas the first available MVP according to a pre-defined order. In oneexample, when a CU is applied in affine merge (AF_MERGE) mode, it getsthe first block coded with affine mode from the valid neighborreconstructed blocks based on the visiting order:A1→B1→B0→A0→B2→NA-blocks. Thus, in this example, if none of blocks A1,B1, B0, A0, or B2 are coded with affine mode, the video coder maydetermine that the MVP for the CU is a first one of the non-adjacentblocks that is coded in the affine mode.

As briefly discussed above, the motion derivation process in FRUC mergemode includes two steps. In particular, a CU-level motion search isfirst performed, followed by sub-CU level motion refinement. At the CUlevel, a video coder derives an initial motion vector for the whole CUbased on bilateral matching or template matching. To derive the initialmotion vector for the whole CU, the video coder may first generate alist of MV candidates (FRUC CU level MV candidates set) and the videocoder selects the candidate which leads to the minimum matching cost asthe starting point for further CU level refinement. Then, the videocoder performs a local search based on bilateral matching or templatematching around the starting point. The video coder then takes the MVthat results in the minimum matching cost as the MV for the whole CU.Subsequently, the video coder may further refine the motion informationat the sub-CU level with a FRUC sub-CU level MV candidates set whichcontains the derived CU motion vectors.

This disclosure proposes to add one or more NA-SMVPs into the FRUC CUlevel MV candidates set, FRUC sub-CU level MV candidates set or both.Thus, a video coder (e.g., video encoder 20 or video decoder 30) maydetermine a set of CU-level FRUC motion vector candidates. In accordancewith a technique of this disclosure, the set of CU-level FRUC motionvector candidates may include one or more NA-SMVPs. Additionally, thevideo coder may select a CU-level FRUC motion vector candidate from theset of CU-level FRUC motion vector candidates. The video coder may thendetermine a CU-level motion vector at least in part by performing alocal search starting from a selected CU-level FRUC motion vectorcandidate. The video coder may also refine the CU-level motion vector ata sub-CU level with a set of FRUC sub-CU level motion vector candidates.In this example, at least one of the set of CU-level FRUC motion vectorcandidates and the set of FRUC sub-CU level motion vector candidates mayinclude a NA-SMVP that specifies a motion vector of a non-adjacentblock. The NA-SMVP may be determined in accordance with any of theexamples provided elsewhere in this disclosure.

The high-level syntax related to the non-adjacent MVPs can bepre-determined or explicitly signaled into the bitstreams. Thehigh-level syntax includes, but is not limited to, the following controlparameters:

-   -   1. The number of adjacent blocks N. In some examples, the number        is adaptive according to the coding information such as block        size. In some examples, the number N is dependent on the coded        mode (e.g., Skip/merge/AMVP) or the maximum allowed number of        candidates for the merge/AMVP/skip mode.    -   2. The distance s/t (signal multiple parameters s/t if they        exist), where s is the horizontal displacement and t is the        vertical displacement for the NA blocks as shown in FIGS. 20-23.    -   3. The size of the parent block for NA-blocks determination.    -   4. The enabling/disabling of the non-adjacent MVPs.    -   5. The number of levels for locating NA-blocks as discussed        above with respect to FIGS. 20-22.

In HEVC, the merging candidate list size ranges from 1 to 5, while theAMVP candidate list size is fixed to 2. In the JEM, the mergingcandidate list size ranges from 1 to 7 while the AMVP candidate listsize is fixed to 2. When NA-SMVPs are included in the MVP or mergingcandidates list, the maximum candidate list size may be increasedaccordingly. For example, the merging candidate list size may beincreased to N (where N is a positive integer and N>7) when one or moreNA-SMVPs are inserted into the merging candidate list size. In thisexample, the AMVP candidate list size may be increased to M (M is apositive integer and M>2) when one or more NA-SMVPs are inserted intothe merging candidate list size.

This disclosure also proposes to use synthetic MV candidates in additionto those provided in HEVC. The utilization of the additional syntheticMV candidates can also follow the examples provided elsewhere in thisdisclosure with respect to use of non-adjacent MVPs. That is, syntheticMV candidates can be generated based on motion parameters ofnon-adjacent blocks, where the non-adjacent blocks are determinedaccording to any of the examples provided above.

In some examples, a video coder (e.g., video encoder 20 or video decoder30) generates synthetic uni-prediction candidates by splitting theavailable bi-prediction MV candidates into two separate uni-predictioncandidates according to a pre-defined order, such as A₁, B₁, B₀, A₀, B₂(see FIG. 2). The video coder may then insert the created syntheticuni-prediction candidates into the candidate list.

Furthermore, in some examples, when integer MVD (i.e., an MVD specifiedto a precision of one luma sample) or four luma samples MVD (i.e., anMVD specified to a precision of four luma samples) is enabled, a videocoder may generate synthetic integer MV candidates (i.e., MV candidateshaving motion vectors with a precision of one luma sample) or four lumasamples MV candidates (i.e., MV candidates having motion vectors with aprecision of four luma samples) by rounding or truncating the availableMV candidates into integer MV or four luma samples MV candidates. Thevideo coder may then insert the generated synthetic integer MVcandidates or 4 luma samples MV candidates into the candidate list.

This disclosure also proposes ways to include multiple TMVP candidatesin a merge candidate list or an AMVP candidate list. In one example,following the HEVC design wherein one co-located picture is signaled, avideo coder uses more temporal neighboring blocks to derive more TMVPcandidates. For instance, in addition to just checking the H and Cblocks (depicted in FIG. 2) in order and picking one of them, the videocoder may check more blocks (e.g., the co-located blocks of spatialneighboring blocks of the current block). In one example, the spatialneighboring blocks checked by the video coder may include only adjacentblocks, e.g. A₀, A₁, B₀, B₁ and B₂ as shown in FIG. 16. Thus, in thisexample, the video coder considers up to five co-located blocks of theadjacent blocks (including or in addition to the H and C blocks). Inanother example, the video coder may also consider co-located blocks ofNA-blocks (e.g., the 11 NA-blocks (NA_(1,1), NA_(1,2), NA_(1,3),NA_(1,4), NA_(1,5), NA_(1,6), NA_(1,7), NA_(1,8), NA_(1,9), NA_(1,10),NA_(1,11)) in FIG. 16).

In some examples, the video coder considers co-located blocks located atthe opposite side of the current block. For example, for the NA-blockNA_(1,6) (located at (−4, −4) position) in FIG. 16, the video coder mayselect the corresponding NA-col-block (i.e., a block that is collocatedwith a non-adjacent block and that is a reference picture) as the blocklocated at (W+3, H+3), where W and H are the width and height of thecurrent block in basic units of block size of motion information (e.g.,4×4). This creates a set of NA-col-blocks which lie in the bottom andright positions of the current block. In some examples, the video coderadds this set of MV candidates (i.e., the MV candidates defined fromNA-col-blocks) in an interleaving fashion to the NA-SMVP. Alternatively,in some examples, the video coder may insert this set of MV candidatesas the set of TMVP candidates as in the existing AMVP or mergederivation processes described elsewhere in this disclosure.

In some examples, the video coder may select more than one co-locatedpicture. In other words, the video coder may select more than onereference picture from which to derive TMVP candidates. In suchexamples, the selected pictures may be defined as all the referencepictures included in the reference picture lists or the selectedpictures may be signaled. In one example, for each selected referencepicture, the video coder may check the H and C blocks within theselected reference picture in the same order as used in HEVC (i.e.,bottom-right, then center). Alternatively, in one example, for eachselected picture, the video coder checks more blocks (e.g., theco-located blocks of spatially adjacent and/or NA-blocks of the currentblock).

Furthermore, when the video coder derives multiple TMVP candidates, thevideo coder may apply a pruning process to remove identical ones amongthem. Alternatively, in some examples, the video coder may apply alimited pruning process, which means one of the TMVP candidates may beonly compared to a certain number of candidates instead of all ofothers. In one example, furthermore, the video coder may further apply apruning process between one TMVP candidate and other candidates (such asspatial merging candidates). The proposed techniques for usingadditional TMVPs may be applied to certain coding modes, such as themerge and/or AMVP mode.

As described in G. J. Sullivan, J.-R. Ohm, W.-J. Han, and T. Wiegand,“Overview of the High Efficiency Video Coding (HEVC) Standard,” IEEETransactions on Circuits and Systems for Video Technology, vol. 22, no.12, pp. 1649-1668, December 2012, due to the increased number of intraprediction directions as compared to H.264/MPEG-4 AVC, HEVC considersthree most probable modes (MPMs) when coding the luma intra predictionmode predictively, rather than the one most probable mode considered inH.264/MPEG-4 AVC. The MPM is derived from the intra modes of spatiallyadjacent blocks. In the case that the current luma prediction mode isone of three MPMs, only the MPM index is transmitted to the decoder.Otherwise, the index of the current luma prediction mode excluding thethree MPMs is transmitted to the decoder by using a 5-bit fixed lengthcode. The JEM also follows the same intra mode prediction schemes.However, the JEM may include more than three MPMs.

This disclosure proposes techniques to use the intra modes ofnon-adjacent blocks to derive one or more MPMs to achieve betterprediction efficiency. The techniques described in previous sections canbe applied to MPM derivations. Examples of deriving MPMs fromnon-adjacent blocks are provided with respect to FIG. 35 and FIG. 36,below.

FIG. 24 is a block diagram illustrating an example video encoder 20 thatmay implement the techniques of this disclosure. FIG. 24 is provided forpurposes of explanation and should not be considered limiting of thetechniques as broadly exemplified and described in this disclosure. Thetechniques of this disclosure may be applicable to various codingstandards or methods.

Processing circuitry includes video encoder 20, and video encoder 20 isconfigured to perform one or more of the example techniques described inthis disclosure. For instance, video encoder 20 includes integratedcircuitry, and the various units illustrated in FIG. 24 may be formed ashardware circuit blocks that are interconnected with a circuit bus.These hardware circuit blocks may be separate circuit blocks or two ormore of the units may be combined into a common hardware circuit block.The hardware circuit blocks may be formed as combination of electriccomponents that form operation blocks such as arithmetic logic units(ALUs), elementary function units (EFUs), as well as logic blocks suchas AND, OR, NAND, NOR, XOR, XNOR, and other similar logic blocks.

In some examples, one or more of the units illustrated in FIG. 24 may besoftware units executing on the processing circuitry. In such examples,the object code for these software units is stored in memory. Anoperating system may cause video encoder 20 to retrieve the object codeand execute the object code, which causes video encoder 20 to performoperations to implement the example techniques. In some examples, thesoftware units may be firmware that video encoder 20 executes atstartup. Accordingly, video encoder 20 is a structural component havinghardware that performs the example techniques or has software/firmwareexecuting on the hardware to specialize the hardware to perform theexample techniques.

In the example of FIG. 24, video encoder 20 includes a predictionprocessing unit 100, video data memory 101, a residual generation unit102, a transform processing unit 104, a quantization unit 106, aninverse quantization unit 108, an inverse transform processing unit 110,a reconstruction unit 112, a filter unit 114, a decoded picture buffer116, and an entropy encoding unit 118. Prediction processing unit 100includes an inter-prediction processing unit 120 and an intra-predictionprocessing unit 126. Inter-prediction processing unit 120 may include amotion estimation unit and a motion compensation unit (not shown).

Video data memory 101 may be configured to store video data to beencoded by the components of video encoder 20. The video data stored invideo data memory 101 may be obtained, for example, from video source18. Decoded picture buffer 116 may be a reference picture memory thatstores reference video data for use in encoding video data by videoencoder 20, e.g., in intra- or inter-coding modes. Video data memory 101and decoded picture buffer 116 may be formed by any of a variety ofmemory devices, such as dynamic random access memory (DRAM), includingsynchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM(RRAM), or other types of memory devices. Video data memory 101 anddecoded picture buffer 116 may be provided by the same memory device orseparate memory devices. In various examples, video data memory 101 maybe on-chip with other components of video encoder 20, or off-chiprelative to those components. Video data memory 101 may be the same asor part of storage media 19 of FIG. 1.

Video encoder 20 receives video data. Video encoder 20 may encode eachCTU in a slice of a picture of the video data. Each of the CTUs may beassociated with equally-sized luma coding tree blocks (CTBs) andcorresponding CTBs of the picture. As part of encoding a CTU, predictionprocessing unit 100 may perform partitioning to divide the CTBs of theCTU into progressively-smaller blocks. The smaller blocks may be codingblocks of CUs. For example, prediction processing unit 100 may partitiona CTB associated with a CTU according to a tree structure.

Video encoder 20 may encode CUs of a CTU to generate encodedrepresentations of the CUs (i.e., coded CUs). As part of encoding a CU,prediction processing unit 100 may partition the coding blocksassociated with the CU among one or more PUs of the CU. Thus, each PUmay be associated with a luma prediction block and corresponding chromaprediction blocks. Video encoder 20 and video decoder 30 may support PUshaving various sizes. As indicated above, the size of a CU may refer tothe size of the luma coding block of the CU and the size of a PU mayrefer to the size of a luma prediction block of the PU. Assuming thatthe size of a particular CU is 2N×2N, video encoder 20 and video decoder30 may support PU sizes of 2N×2N or N×N for intra prediction, andsymmetric PU sizes of 2N×2N, 2N×N, N×2N, N×N, or similar for interprediction. Video encoder 20 and video decoder 30 may also supportasymmetric partitioning for PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2Nfor inter prediction.

Inter-prediction processing unit 120 may generate predictive data for aPU. As part of generating the predictive data for a PU, inter-predictionprocessing unit 120 performs inter prediction on the PU. The predictivedata for the PU may include predictive blocks of the PU and motioninformation for the PU. Inter-prediction processing unit 120 may performdifferent operations for a PU of a CU depending on whether the PU is inan I slice, a P slice, or a B slice. In an I slice, all PUs are intrapredicted. Hence, if the PU is in an I slice, inter-predictionprocessing unit 120 does not perform inter prediction on the PU. Thus,for blocks encoded in I-mode, the predicted block is formed usingspatial prediction from previously-encoded neighboring blocks within thesame frame. If a PU is in a P slice, inter-prediction processing unit120 may use uni-directional inter prediction to generate a predictiveblock of the PU. If a PU is in a B slice, inter-prediction processingunit 120 may use uni-directional or bi-directional inter prediction togenerate a predictive block of the PU.

Inter-prediction processing unit 120 may perform particular techniquesof this disclosure. For example, inter-prediction processing unit 120may determine a motion vector of a non-adjacent block of a currentpicture of the video data, the non-adjacent block being non-adjacent toa current block of the current picture. Additionally, inter-predictionprocessing unit 120 may determine, based on the motion vector of thenon-adjacent block, an MVP for the current block. Additionally,inter-prediction processing unit 120 may determine a motion vector ofthe current block, wherein the motion vector is equal to a motion vectorof the MVP for the current block or is equal to the motion vector of theMVP for the current block plus a MVD signaled in a bitstream.

Intra-prediction processing unit 126 may generate predictive data for aPU by performing intra prediction on the PU. The predictive data for thePU may include predictive blocks of the PU and various syntax elements.Intra-prediction processing unit 126 may perform intra prediction on PUsin I slices, P slices, and B slices.

To perform intra prediction on a PU, intra-prediction processing unit126 may use multiple intra prediction modes to generate multiple sets ofpredictive data for the PU. Intra-prediction processing unit 126 may usesamples from sample blocks of neighboring PUs to generate a predictiveblock for a PU. The neighboring PUs may be above, above and to theright, above and to the left, or to the left of the PU, assuming aleft-to-right, top-to-bottom encoding order for PUs, CUs, and CTUs.Intra-prediction processing unit 126 may use various numbers of intraprediction modes, e.g., 33 directional intra prediction modes. In someexamples, the number of intra prediction modes may depend on the size ofthe region associated with the PU.

Prediction processing unit 100 may select the predictive data for PUs ofa CU from among the predictive data generated by inter-predictionprocessing unit 120 for the PUs or the predictive data generated byintra-prediction processing unit 126 for the PUs. In some examples,prediction processing unit 100 selects the predictive data for the PUsof the CU based on rate/distortion metrics of the sets of predictivedata. The predictive blocks of the selected predictive data may bereferred to herein as the selected predictive blocks. Intra-predictionprocessing unit 126 may perform the techniques of this disclosurerelated to the MPMs.

Residual generation unit 102 may generate, based on the coding blocks(e.g., luma, Cb and Cr coding blocks) for a CU and the selectedpredictive blocks (e.g., predictive luma, Cb and Cr blocks) for the PUsof the CU, residual blocks (e.g., luma, Cb and Cr residual blocks) forthe CU. For instance, residual generation unit 102 may generate theresidual blocks of the CU such that each sample in the residual blockshas a value equal to a difference between a sample in a coding block ofthe CU and a corresponding sample in a corresponding selected predictiveblock of a PU of the CU.

Transform processing unit 104 may partition the residual blocks of a CUinto transform blocks of TUs of the CU. For instance, transformprocessing unit 104 may perform quad-tree partitioning to partition theresidual blocks of the CU into transform blocks of TUs of the CU. Thus,a TU may be associated with a luma transform block and two chromatransform blocks. The sizes and positions of the luma and chromatransform blocks of TUs of a CU may or may not be based on the sizes andpositions of prediction blocks of the PUs of the CU. A quad-treestructure known as a “residual quad-tree” (RQT) may include nodesassociated with each of the regions. The TUs of a CU may correspond toleaf nodes of the RQT.

Transform processing unit 104 may generate transform coefficient blocksfor each TU of a CU by applying one or more transforms to the transformblocks of the TU. Transform processing unit 104 may apply varioustransforms to a transform block associated with a TU. For example,transform processing unit 104 may apply a discrete cosine transform(DCT), a directional transform, or a conceptually similar transform to atransform block. In some examples, transform processing unit 104 doesnot apply transforms to a transform block. In such examples, thetransform block may be treated as a transform coefficient block.

Quantization unit 106 may quantize the transform coefficients in acoefficient block. Quantization unit 106 may quantize a coefficientblock associated with a TU of a CU based on a quantization parameter(QP) value associated with the CU. Video encoder 20 may adjust thedegree of quantization applied to the coefficient blocks associated witha CU by adjusting the QP value associated with the CU. Quantization mayintroduce loss of information. Thus, quantized transform coefficientsmay have lower precision than the original ones.

Inverse quantization unit 108 and inverse transform processing unit 110may apply inverse quantization and inverse transforms to a coefficientblock, respectively, to reconstruct a residual block from thecoefficient block. Reconstruction unit 112 may add the reconstructedresidual block to corresponding samples from one or more predictiveblocks generated by prediction processing unit 100 to produce areconstructed transform block associated with a TU. By reconstructingtransform blocks for each TU of a CU in this way, video encoder 20 mayreconstruct the coding blocks of the CU.

Filter unit 114 may perform one or more deblocking operations to reduceblocking artifacts in the coding blocks associated with a CU. Decodedpicture buffer 116 may store the reconstructed coding blocks afterfilter unit 114 performs the one or more deblocking operations on thereconstructed coding blocks. Inter-prediction processing unit 120 mayuse a reference picture that contains the reconstructed coding blocks toperform inter prediction on PUs of other pictures. In addition,intra-prediction processing unit 126 may use reconstructed coding blocksin decoded picture buffer 116 to perform intra prediction on other PUsin the same picture as the CU.

Entropy encoding unit 118 may receive data from other functionalcomponents of video encoder 20. For example, entropy encoding unit 118may receive coefficient blocks from quantization unit 106 and mayreceive syntax elements from prediction processing unit 100. Entropyencoding unit 118 may perform one or more entropy encoding operations onthe data to generate entropy-encoded data. For example, entropy encodingunit 118 may perform a CABAC operation, a context-adaptive variablelength coding (CAVLC) operation, a variable-to-variable (V2V) lengthcoding operation, a syntax-based context-adaptive binary arithmeticcoding (SBAC) operation, a Probability Interval Partitioning Entropy(PIPE) coding operation, an Exponential-Golomb encoding operation, oranother type of entropy encoding operation on the data. Video encoder 20may output a bitstream that includes entropy-encoded data generated byentropy encoding unit 118. For instance, the bitstream may include datathat represents values of transform coefficients for a CU.

FIG. 25 is a block diagram illustrating an example video decoder 30 thatis configured to implement the techniques of this disclosure. FIG. 25 isprovided for purposes of explanation and is not limiting on thetechniques as broadly exemplified and described in this disclosure. Forpurposes of explanation, this disclosure describes video decoder 30 inthe context of HEVC coding. However, the techniques of this disclosuremay be applicable to other coding standards or methods.

Processing circuitry includes video decoder 30, and video decoder 30 isconfigured to perform one or more of the example techniques described inthis disclosure. For instance, video decoder 30 includes integratedcircuitry, and the various units illustrated in FIG. 25 may be formed ashardware circuit blocks that are interconnected with a circuit bus.These hardware circuit blocks may be separate circuit blocks or two ormore of the units may be combined into a common hardware circuit block.The hardware circuit blocks may be formed as a combination of electroniccomponents that form operation blocks such as arithmetic logic units(ALUs), elementary function units (EFUs), as well as logic blocks suchas AND, OR, NAND, NOR, XOR, XNOR, and other similar logic blocks.

In some examples, one or more of the units illustrated in FIG. 25 may besoftware units executing on the processing circuitry. In such examples,the object code for these software units is stored in memory. Anoperating system may cause video decoder 30 to retrieve the object codeand execute the object code, which causes video decoder 30 to performoperations to implement the example techniques. In some examples, thesoftware units may be firmware that video decoder 30 executes atstartup. Accordingly, video decoder 30 is a structural component havinghardware that performs the example techniques or has software/firmwareexecuting on the hardware to specialize the hardware to perform theexample techniques.

In the example of FIG. 25, video decoder 30 includes an entropy decodingunit 150, video data memory 151, a prediction processing unit 152, aninverse quantization unit 154, an inverse transform processing unit 156,a reconstruction unit 158, a filter unit 160, and a decoded picturebuffer 162. Prediction processing unit 152 includes a motioncompensation unit 164 and an intra-prediction processing unit 166. Inother examples, video decoder 30 may include more, fewer, or differentfunctional components.

Video data memory 151 may store encoded video data, such as an encodedvideo bitstream, to be decoded by the components of video decoder 30.The video data stored in video data memory 151 may be obtained, forexample, from computer-readable medium 16, e.g., from a local videosource, such as a camera, via wired or wireless network communication ofvideo data, or by accessing physical data storage media. Video datamemory 151 may form a coded picture buffer (CPB) that stores encodedvideo data from an encoded video bitstream. Decoded picture buffer 162may be a reference picture memory that stores reference video data foruse in decoding video data by video decoder 30, e.g., in intra- orinter-coding modes, or for output. Video data memory 151 and decodedpicture buffer 162 may be formed by any of a variety of memory devices,such as dynamic random access memory (DRAM), including synchronous DRAM(SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or othertypes of memory devices. Video data memory 151 and decoded picturebuffer 162 may be provided by the same memory device or separate memorydevices. In various examples, video data memory 151 may be on-chip withother components of video decoder 30, or off-chip relative to thosecomponents. Video data memory 151 may be the same as or part of storagemedia 28 of FIG. 1.

Video data memory 151 receives and stores encoded video data (e.g., NALunits) of a bitstream. Entropy decoding unit 150 may receive encodedvideo data (e.g., NAL units) from video data memory 151 and may parsethe NAL units to obtain syntax elements. Entropy decoding unit 150 mayentropy decode entropy-encoded syntax elements in the NAL units.Prediction processing unit 152, inverse quantization unit 154, inversetransform processing unit 156, reconstruction unit 158, and filter unit160 may generate decoded video data based on the syntax elementsextracted from the bitstream. Entropy decoding unit 150 may perform aprocess generally reciprocal to that of entropy encoding unit 118.

In addition to obtaining syntax elements from the bitstream, videodecoder 30 may perform a reconstruction operation on a non-partitionedCU. To perform the reconstruction operation on a CU, video decoder 30may perform a reconstruction operation on each TU of the CU. Byperforming the reconstruction operation for each TU of the CU, videodecoder 30 may reconstruct residual blocks of the CU.

As part of performing a reconstruction operation on a TU of a CU,inverse quantization unit 154 may inverse quantize, i.e., de-quantize,coefficient blocks associated with the TU. After inverse quantizationunit 154 inverse quantizes a coefficient block, inverse transformprocessing unit 156 may apply one or more inverse transforms to thecoefficient block in order to generate a residual block associated withthe TU. For example, inverse transform processing unit 156 may apply aninverse DCT, an inverse integer transform, an inverse Karhunen-Loevetransform (KLT), an inverse rotational transform, an inverse directionaltransform, or another inverse transform to the coefficient block.

If a PU is encoded using intra prediction, intra-prediction processingunit 166 may perform intra prediction to generate predictive blocks ofthe PU. Intra-prediction processing unit 166 may use an intra predictionmode to generate the predictive blocks of the PU based on samplesspatially-neighboring blocks. Intra-prediction processing unit 166 maydetermine the intra prediction mode for the PU based on one or moresyntax elements obtained from the bitstream. Intra-prediction processingunit 166 may perform the techniques of this disclosure related to theMPMs.

If a PU is encoded using inter prediction, entropy decoding unit 150and/or motion compensation unit 164 may determine motion information forthe PU. Motion compensation unit 164 may determine, based on the motioninformation of the PU, one or more reference blocks. Motion compensationunit 164 may generate, based on the one or more reference blocks,predictive blocks (e.g., predictive luma, Cb and Cr blocks) for the PU.

In accordance with a technique of this disclosure, motion compensationunit 164 may determine a motion vector of a non-adjacent block of acurrent picture of the video data, the non-adjacent block beingnon-adjacent to a current block of the current picture. Additionally,motion compensation unit 164 may determine, based on the motion vectorof the non-adjacent block, a motion MVP for the current block. Motioncompensation unit 164 may also determine, based on the MVP for thecurrent block, a motion vector of the current block.

Reconstruction unit 158 may use transform blocks (e.g., luma, Cb and Crtransform blocks) for TUs of a CU and the predictive blocks (e.g., luma,Cb and Cr blocks) of the PUs of the CU, i.e., either intra-predictiondata or inter-prediction data, as applicable, to reconstruct the codingblocks (e.g., luma, Cb and Cr coding blocks) for the CU. For example,reconstruction unit 158 may add samples of the transform blocks (e.g.,luma, Cb and Cr transform blocks) to corresponding samples of thepredictive blocks (e.g., luma, Cb and Cr predictive blocks) toreconstruct the coding blocks (e.g., luma, Cb and Cr coding blocks) ofthe CU.

Filter unit 160 may perform a deblocking operation to reduce blockingartifacts associated with the coding blocks of the CU. Video decoder 30may store the coding blocks of the CU in decoded picture buffer 162.Decoded picture buffer 162 may provide reference pictures for subsequentmotion compensation, intra prediction, and presentation on a displaydevice, such as display device 32 of FIG. 1. For instance, video decoder30 may perform, based on the blocks in decoded picture buffer 162, intraprediction or inter prediction operations for PUs of other CUs.

Certain aspects of this disclosure have been described with respect toextensions of the HEVC standard for purposes of illustration. However,the techniques described in this disclosure may be useful for othervideo coding processes, including other standard or proprietary videocoding processes not yet developed.

A video coder, as described in this disclosure, may refer to a videoencoder or a video decoder. Similarly, a video coding unit may refer toa video encoder or a video decoder. Likewise, video coding may refer tovideo encoding or video decoding, as applicable. In this disclosure, thephrase “based on” may indicate based only on, based at least in part on,or based in some way on. This disclosure may use the term “video unit”or “video block” or “block” to refer to one or more sample blocks andsyntax structures used to code samples of the one or more blocks ofsamples. Example types of video units may include CTUs, CUs, PUs,transform units (TUs), macroblocks, macroblock partitions, and so on. Insome contexts, discussion of PUs may be interchanged with discussion ofmacroblocks or macroblock partitions. Example types of video blocks mayinclude coding tree blocks, coding blocks, and other types of blocks ofvideo data.

FIG. 26 is a flowchart illustrating an example operation of a videoencoder to encode video data, in accordance with one or more techniquesof this disclosure. In the example of FIG. 26, video encoder 20 maydetermine a motion vector of a non-adjacent block of a current pictureof the video data (2600). The non-adjacent block is non-adjacent to acurrent block of the current picture.

Furthermore, video encoder 20 may determine, based on the motion vectorof the non-adjacent block, an MVP for the current block (2602). In someexamples, the MVP for the current block is in affine mode. In otherwords, motion vectors are specified for control points in the MVP. Insome examples, the non-adjacent block is a block in a template thatdefines a fixed pattern of non-adjacent blocks relative to a position ofthe current block.

In one example, as part of determining the MVP for the current block,video encoder 20 may generate, based in part on the motion vector of thenon-adjacent block, a list of MVP candidates. In this example, the listof MVP candidates includes an MVP candidate that specifies the motionvector of the non-adjacent block. Furthermore, in this example, videoencoder 20 may determine, from among the MVP candidates in the list ofMVP candidates, the MVP for the current block. For instance, videoencoder 20 may use a RD cost analysis to determine the MVP for thecurrent block.

In some examples, video encoder 20 orders a plurality of NA-SMVPcandidates in the list of MVP candidates. In such examples, for eachrespective NA-SMVP candidate of the plurality of NA-SMVP candidates, therespective NA-SMVP candidate corresponds to a respective non-adjacentblock of a plurality of non-adjacent blocks and the respective NA-SMVPspecifies a motion vector of the respective non-adjacent block. Theplurality of non-adjacent blocks includes the first non-adjacent block.Furthermore, in this example, video encoder 20 may order the pluralityof NA-SMVP candidates in the list according to distance of correspondingnon-adjacent blocks from the current block. The distance may be in theL1 or L2 sense.

In some examples, video encoder 20 determines a first plurality ofNA-SMVP candidates. For each respective NA-SMVP candidate of the firstplurality of NA-SMVP candidates, the respective NA-SMVP candidatecorresponds to a respective non-adjacent block of a plurality ofnon-adjacent blocks. The respective NA-SMVP specifies a motion vector ofthe respective non-adjacent block. The first plurality of non-adjacentblocks includes the first non-adjacent block. In this example, videoencoder 20 may include a second plurality of NA-SMVP candidates in thelist, the second plurality of NA-SMVP candidates comprisesnon-duplicative NA-SMVP candidates in the first plurality of NA-SMVPcandidates. In this way, video encoder 20 may perform a pruning processthat removes duplicate NA-SMVP candidates from the list. The secondplurality of NA-SMVP candidates may be ordered in the list according toa frequency with which motion vectors specified by the NA-SMVPcandidates in the second plurality of NA-SMVP candidates are specifiedby NA-SMVP candidates in the first plurality of NA-SMVP candidates.

In some examples, the list of MVP candidates is a global motion vectorcandidate list. The global motion vector candidate list comprises MVPcandidates specifying a motion vector for each block that is in thecurrent picture and that is encoded prior to the current block. In suchexamples, the video coder may determine the motion vector of thenon-adjacent block from a MVP candidate in the global motion vectorcandidate list.

Furthermore, in some examples, video encoder 20 stores a plurality ofnon-adjacent MVP candidates in a FIFO buffer. The plurality ofnon-adjacent MVP candidates includes a non-adjacent MVP candidatespecifying the motion vector of the non-adjacent block. In suchexamples, video encoder 20 updates the FIFO buffer to remove anearliest-added non-adjacent MVP candidate from the FIFO buffer and addsan MVP candidate to the FIFO buffer.

In some examples, video encoder 20 applies a pruning process to thelist. The pruning process is adaptive to a block size of the currentblock. For example, a full motion pruning process or a partial motionpruning process may be applied, as described elsewhere in thisdisclosure.

Video encoder 20 may also determine a motion vector of the current block(2604). In some examples, such as where merge mode is used, the motionvector of the current block is equal to a motion vector of the MVP. Insome examples, such as when AMVP is used, the motion vector of thecurrent block is equal to the motion vector of the MVP plus an MVD thatis signaled in a bitstream.

Additionally, video encoder 20 may determine a predictive block based onthe motion vector of the current block (2606). Video encoder 20 maygenerate, based on the predictive block, residual sample values (2608).Video encoder 20 may determine the predictive block and generate theresidual sample values in accordance with any of the examples providedelsewhere in this disclosure.

FIG. 27 is a flowchart illustrating an example operation of videodecoder 30 for decoding video data in accordance with one or moretechniques of this disclosure. In the example of FIG. 27, video decoder30 may determine a motion vector of a non-adjacent block of a currentpicture of the video data (2700). The non-adjacent block is non-adjacentto a current block of the current picture. In some examples, thenon-adjacent block is a block in a template that defines a fixed patternof blocks relative to a position of the current block.

In some examples, the list of MVP candidates is a global motion vectorcandidate list. The global motion vector candidate list comprises MVPcandidates specifying a motion vector for each block that is in thecurrent picture and that is encoded prior to the current block. In suchexamples, the video coder may determine the motion vector of thenon-adjacent block from a MVP candidate in the global motion vectorcandidate list.

Furthermore, in some examples, video decoder 30 stores a plurality ofnon-adjacent MVP candidates in a FIFO buffer. The plurality ofnon-adjacent MVP candidates includes a non-adjacent MVP candidatespecifying the motion vector of the non-adjacent block. In suchexamples, video encoder 20 updates the FIFO buffer to remove anearliest-added non-adjacent MVP candidate from the FIFO buffer and addsan MVP candidate to the FIFO buffer.

Furthermore, video decoder 30 may determine, based on the motion vectorof the non-adjacent block, an MVP for the current block (2702). In someexamples, the MVP for the current block may be in affine mode, anon-affine mode, or another mode of motion compensated prediction. Inone example, as part of determining the MVP for the current block, videodecoder 30 may generate, based in part on the motion vector of thenon-adjacent block, a list of MVP candidates. In this example, the listof MVP candidates includes an MVP candidate that specifies the motionvector of the non-adjacent block. Furthermore, in this example, videodecoder 30 may determine, from among the MVP candidates in the list ofMVP candidates, the MVP for the current block. For instance, videodecoder 30 may use a rate-distortion analysis to identify a best MVP inthe list of MVP candidates.

In some examples, the non-adjacent block is a first non-adjacent blockand video decoder 30 orders a plurality of NA-SMVP candidates in thelist. In other words, video decoder 30 inserts the plurality of NA-SMVPcandidates into the list according to a particular order. In suchexamples, for each respective NA-SMVP candidate of the plurality ofNA-SMVP candidates, the respective NA-SMVP candidate corresponds to arespective non-adjacent block of a plurality of non-adjacent blocks. Therespective NA-SMVP specifies a motion vector of the respectivenon-adjacent block. In some examples, video decoder 30 orders theplurality of NA-SMVP candidates in the list according to distance (e.g.,in terms of L1 or L2) of the corresponding non-adjacent blocks from thecurrent block. In some examples, video decoder 30 orders the pluralityof NA-SMVP candidates in accordance with any of the examples providedelsewhere in this disclosure.

In some examples, the non-adjacent block is a first non-adjacent blockand video decoder 30 further determines a first plurality of NA-SMVPcandidates. For instance, in such examples, for each respective NA-SMVPcandidate of the first plurality of NA-SMVP candidates, the respectiveNA-SMVP candidate corresponds to a respective non-adjacent block of aplurality of non-adjacent blocks. The respective NA-SMVP specifies amotion vector of the respective non-adjacent block. The first pluralityof non-adjacent blocks includes the first non-adjacent block.Furthermore, in such examples, video decoder 30 may order a secondplurality of NA-SMVP candidates in the list. In other words, videodecoder 30 may include the second plurality of NA-SMVP candidates in thelist according to a particular order. The second plurality of NA-SMVPcandidates comprises non-duplicative NA-SMVP candidates in the firstplurality of NA-SMVP candidates. In some examples, the second pluralityof NA-SMVP candidates are ordered in the list according to a frequencywith which motion vectors specified by the NA-SMVP candidate in thesecond plurality of NA-SMVP candidates are specified by NA-SMVPcandidates in the first plurality of NA-SMVP candidates.

In some examples, video decoder 30 may apply a pruning process to thelist. In some such examples, the pruning process is adaptive to a blocksize of the current block. In some examples, video decoder 30 applies afull motion pruning process to the NA-SMVPs and the other mergingcandidates, as described elsewhere in this disclosure. In some examples,video decoder 30 applies only a partial motion pruning process to theNA-SMVPs and the other merging candidates, as described elsewhere inthis disclosure.

Additionally, video decoder 30 may determine, based on the MVP for thecurrent block, a motion vector of the current block (2704). In someexamples, if the list of MVP candidates is a merge candidate list, videodecoder 30 may determine the MVP for the current block such that the MVPfor the current block specifies a motion vector of an MVP candidate inthe list of MVP candidates. In some examples, if the list of MVPcandidates is an AMVP candidate list, video decoder 30 may determine theMVP for the current block such that a motion vector of the MVP for thecurrent block is equal to a motion vector of an MVP candidate in thelist of MVP candidates plus an MVD.

Video decoder 30 may also determine a predictive block based on themotion vector of the current block (2706). For instance, video decoder30 may determine the predictive block based on samples of a referencepicture at a location indicated by the motion vector, as described indetail elsewhere in this disclosure. Video decoder 30 may thenreconstruct, based on the predictive block, sample values of the currentpicture (2708). For instance, video decoder 30 may reconstruct samplevalues of the current picture by adding samples values in the predictiveblock to residual sample values.

FIG. 28 is a flowchart illustrating an example operation for determininga NA-SMVP using FRUC motion vector candidates, in accordance with atechnique of this disclosure. In the example of FIG. 28, a video coder(e.g., video encoder 20 or video decoder 30) may determine a set ofCU-level frame-rate up conversion (FRUC) motion vector candidates(2800). Additionally, the video coder may select a CU-level FRUC motionvector candidate from the set of CU-level FRUC motion vector candidates(2802). The video coder may determine a CU-level motion vector at leastin part by performing a local search starting from a selected CU-levelFRUC motion vector candidate (2804). Furthermore, the video coder mayrefine the CU-level motion vector at a sub-CU level with a set of FRUCsub-CU level motion vector candidates (2806). In accordance with atechnique of this disclosure, at least one of the set of CU-level FRUCmotion vector candidates and the set of FRUC sub-CU level motion vectorcandidates includes a NA-SMVP that specifies the motion vector of thenon-adjacent block of FIG. 26 and FIG. 27. The FRUC process mayotherwise be consistent with the examples provided elsewhere in thisdisclosure.

FIG. 29 is a flowchart illustrating an example operation of videoencoder 20 that includes synthetic candidates in a list of MVPcandidates for a current block, in accordance with one or moretechniques of this disclosure. In the example of FIG. 29, video encoder20 may determine a list of MVP candidates for a current block of acurrent picture of the video data (2900). The list of MVP candidatesincludes a bi-prediction MVP candidate and a synthetic uni-predictionMVP candidate. Furthermore, in the example of FIG. 29 and in accordancewith a technique of this disclosure, video encoder 20 generates, as partof determining the list of MVP candidates, the synthetic uni-predictionMVP candidate based on a motion vector specified by the bi-predictionMVP candidate (2902). In one example, video encoder 20 generates thesynthetic uni-prediction candidates by splitting the availablebi-prediction MV candidates into two separate uni-prediction candidatesaccording to a pre-defined order. In this example, video encoder 20 maythen insert the created synthetic uni-prediction candidates into thecandidate list. In some examples, when integer MVD or four luma samplesMVD is enabled, video encoder 20 may generate synthetic integer or fourluma samples MV candidates by rounding or truncating the available MVcandidates into integer MV or four luma samples MV candidates. In suchexamples, video encoder 20 inserts the synthetic integer MV candidatesor 4 luma samples MV candidates into the candidate list.

Furthermore, in the example of FIG. 29, video encoder 20 may determine,based on a motion vector of a selected MVP candidate in the list of MVPcandidates, an MVP for the current block (2904). Additionally, videoencoder 20 may determine a motion vector of the current block (2906). Insome examples, such as where merge mode is used, the motion vector ofthe current block is equal to a motion vector of the MVP. In someexamples, such as when AMVP is used, the motion vector of the currentblock is equal to the motion vector of the MVP plus an MVD that issignaled in a bitstream.

Video encoder 20 may also determine a predictive block based on themotion vector of the current block (2908). Furthermore, video encoder 20may generate, based on the predictive block, residual sample values(2910). Video encoder 20 may determine the predictive block and generatethe residual sample values in accordance with any of the examplesprovided elsewhere in this disclosure.

FIG. 30 is a flowchart illustrating an example operation of videodecoder 30 that includes synthetic candidates in a list of MVPcandidates for a current block, in accordance with one or moretechniques of this disclosure. In the example of FIG. 30, video decoder30 may determine a list of MVP candidates for a current block of acurrent picture of the video data (3000). The list of MVP candidatesincludes a bi-prediction MVP candidate and a synthetic uni-predictionMVP candidate. Furthermore, in the example of FIG. 30 and in accordancewith a technique of this disclosure, video decoder 30 generates, as partof determining the list of MVP candidates, the synthetic uni-predictionMVP candidate based on a motion vector specified by the bi-predictionMVP candidate (3002). In one example, video decoder 30 generates thesynthetic uni-prediction candidates by splitting the availablebi-prediction MV candidates into two separate uni-prediction candidatesaccording to a pre-defined order. In this example, video decoder 30 maythen insert the created synthetic uni-prediction candidates into thecandidate list. In some examples, when integer MVD or four luma samplesMVD is enabled, video decoder 30 generates synthetic integer or fourluma samples MV candidates by rounding or truncating the available MVcandidates into integer MV or four luma samples MV candidates. In suchexamples, video decoder 30 inserts the synthetic integer MV candidatesor 4 luma samples MV candidates into the candidate list.

In the example of FIG. 30, video decoder 30 may then determine, based ona motion vector of a selected MVP candidate in the list of MVPcandidates, an MVP for the current block (3004). Additionally, videodecoder 30 determines, based on the MVP for the current block, a motionvector of the current block (3006). Video decoder 30 may determine apredictive block based on the motion vector of the current block (3008).Furthermore, video decoder 30 may reconstruct, based on the predictiveblock, sample values of the current picture (3010). Video decoder 30 mayselect the MVP candidate, determine the motion vector, determine thepredictive block, and reconstruct the value values of the currentpicture in accordance with any of the examples provided elsewhere inthis disclosure.

FIG. 31 is a flowchart illustrating an example operation of videoencoder 20 for encoding video data, in accordance with a technique ofthis disclosure. In the example of FIG. 31, video encoder 20 determinesa list of MVP candidates for a current block of a current picture of thevideo data (3100). Video encoder 20 may determine the list of MVPcandidates in accordance with any of the examples provided elsewhere inthis disclosure. Additionally, in accordance with a technique of thisdisclosure, video encoder 20 determines a synthetic MVP candidate byrounding or truncating an MVP candidate in the list to integerresolution or 4 luma sample resolution (3102). Video encoder 20 may theninsert the synthetic MVP candidate in the list of MVP candidate (3104).

Video encoder 20 may then determine, based on a motion vector of aselected MVP candidate in the list of MVP candidates, a motion vectorpredictor (MVP) for the current block (3106). For instance, videoencoder 20 may use a rate-distortion test to select the MVP for thecurrent block. Furthermore, video encoder 20 may determine a motionvector of the current block (3108). In some examples, such as wheremerge mode is used, the motion vector of the current block is equal to amotion vector of the MVP. In some examples, such as when AMVP is used,the motion vector of the current block is equal to the motion vector ofthe MVP plus an MVD that is signaled in a bitstream.

Video encoder 20 may determine, a predictive block based on the motionvector of the current block (3110). Next, video encoder 20 may generate,based on the predictive block, residual sample values (3112). Videoencoder 20 may determine the predictive block and generate the residualsample values in accordance with any of the examples provided elsewherein this disclosure.

FIG. 32 is a flowchart illustrating an example operation of videodecoder 30 for decoding video data, in accordance with a technique ofthis disclosure. In the example of FIG. 32, video decoder 30 determinesa list of MVP candidates for a current block of a current picture of thevideo data (3200). Video decoder 30 may determine the list of MVPcandidates in accordance with any of the examples provided elsewhere inthis disclosure. Additionally, in accordance with a technique of thisdisclosure, video decoder 30 may determine a synthetic MVP candidate byrounding or truncating an MVP candidate in the list to integerresolution or 4 luma sample resolution (3202). Video decoder 30 may theninsert the synthetic MVP candidate in the list of MVP candidates (3204).

Subsequently, video decoder 30 may determine, based on a motion vectorof a selected MVP candidate in the list of MVP candidates, an MVP forthe current block (3206). Additionally, video decoder 30 may determine,based on the MVP for the current block, a motion vector of the currentblock (3208). Video decoder 30 may also determine a predictive blockbased on the motion vector of the current block (3210). Furthermore,video decoder 30 may reconstruct, based on the predictive block, samplevalues of the current picture (3212). Video decoder 30 may select theMVP candidate, determine the motion vector, determine the predictiveblock, and reconstruct the value values of the current picture inaccordance with any of the examples provided elsewhere in thisdisclosure.

FIG. 33 is a flowchart illustrating an example operation of videoencoder 20 for encoding video data, in accordance with a technique ofthis disclosure. In the example of FIG. 33, video encoder 20 maydetermine a list of MVP candidates for a current block of a currentpicture of the video data (3300). In general, video encoder 20 maydetermine the list of MVP candidates in accordance with any of theexamples provided elsewhere in this disclosure. However, in accordancewith a technique of this disclosure, the list of MVP candidates includesa plurality of TMVP candidates. Each respective MVP candidate in thelist of MVP candidates specifies a respective motion vector. RespectiveTMVP candidates of the plurality of TMVP candidates specify motionvectors of one or more blocks in one or more reference pictures (e.g., asingle reference picture, a plurality of reference pictures, etc.).

In some examples, the plurality of TMVP candidates includes two or moreTMVP candidate specifying motion vectors of reference blocks collocatedwith locations in the current picture (e.g., locations adjacent to thecurrent block, locations not adjacent to the current block). In suchexamples, the reference blocks are blocks of one or more referencepictures.

In some examples, video encoder 20 applies a pruning process to the listof MVP candidates. For instance, video encoder 20 may apply a pruningprocess to the list of MVP candidates to remove all or some identicalMVP candidates in the list of MVP candidates.

Furthermore, in the example of FIG. 33, video encoder 20 may determine,based on a motion vector of a selected MVP candidate in the list of MVPcandidates, an MVP for the current block (3302). For instance, videoencoder 20 may use a rate-distortion test to determine the MVP for thecurrent block. Video encoder 20 may also determine a motion vector ofthe current block (3304). In some examples, such as where merge mode isused, the motion vector of the current block is equal to a motion vectorof the MVP. In some examples, such as when AMVP is used, the motionvector of the current block is equal to the motion vector of the MVPplus an MVD that is signaled in a bitstream.

Furthermore, video encoder 20 may use the motion vector of the currentblock to determine a predictive block (3306). Additionally, videoencoder 20 may generate, based on the predictive block, residual samplevalues (3308). Video encoder 20 may determine the predictive block andgenerate the residual sample values in accordance with any of theexamples provided elsewhere in this disclosure.

FIG. 34 is a flowchart illustrating an example operation of videodecoder 30 for decoding video data, in accordance with one or moreexamples of this disclosure. In the example of FIG. 34, video decoder 30may determine a list of MVP candidates for a current block of a currentpicture of the video data (3400). In general, video decoder 30 maydetermine the list of MVP candidates in accordance with any of theexamples provided elsewhere in this disclosure. However, in accordancewith a technique of this disclosure, the list of MVP candidates includesa plurality of TMVP candidates. Each respective MVP candidate in thelist of MVP candidates specifies a respective motion vector. RespectiveTMVP candidates of the plurality of TMVP candidates specifies a motionvector of one or more blocks in one or more reference pictures (e.g., asingle reference picture, a plurality of reference pictures, etc.).

In one example, the plurality of TMVP candidates includes two or moreTMVP candidates specifying motion vectors of reference blocks collocatedwith locations in the current picture. In this example, the referenceblocks are blocks of one or more reference pictures (e.g., a singlereference picture, a plurality of reference pictures, etc.). In someinstances of this example, the locations are adjacent to the currentblock. In some instances of this example, the locations are not adjacentto the current block.

In some examples, video decoder 30 may apply a pruning process to thelist of MVP candidates. For instance, video decoder 30 may apply apruning process to the list of MVP candidates to remove all or someidentical MVP candidates in the list of MVP candidates.

Furthermore, in the example of FIG. 34, video decoder 30 may determine,based on a motion vector of a selected MVP candidate in the list of MVPcandidates, an MVP for the current block (3402). Video decoder 30 maydetermine, based on the MVP for the current block, a motion vector ofthe current block (3404). Additionally, video decoder 30 may determine apredictive block based on the motion vector of the current block (3406).Video decoder 30 may reconstruct, based on the predictive block, samplevalues of the current picture (3408). Video decoder 30 may select theMVP candidate, determine the motion vector, determine the predictiveblock, and reconstruct the value values of the current picture inaccordance with any of the examples provided elsewhere in thisdisclosure.

FIG. 35 is a flowchart illustrating an example operation of videoencoder 20 for encoding video data, in accordance with a technique ofthis disclosure. In the example of FIG. 35, video encoder 20 maydetermine a plurality of Most Probable Modes (MPMs) (3500). Eachrespective MPM of the plurality of MPMs specifies a respective intraprediction mode of a respective block. In the example of FIG. 35, theplurality of MPMs includes a particular MPM that specifies an intraprediction mode of a non-adjacent block of a current picture of thevideo data. The non-adjacent block is non-adjacent to a current block ofthe current picture. In some examples, the non-adjacent block is a blockin a template that defines a fixed pattern of non-adjacent blocksrelative to a position of the current block. In other examples, thenon-adjacent blocks are blocks that are within a particular distance ofthe current block. The non-adjacent block may be determined inaccordance with any of the examples provided elsewhere in thisdisclosure.

In some examples, as part of determining the plurality of MPMs, videoencoder 20 may determine an ordered list of the MPMs. In such examples,the MPMs based on non-adjacent blocks are ordered in the list accordingto a frequency with which intra prediction modes are specified bynon-adjacent blocks in a plurality of non-adjacent blocks. In otherexamples, the MPMs based on the non-adjacent blocks are not ordered inthe list according to such a frequency.

In some examples, to determine the plurality of MPMs, video encoder 20may determine a global MPM list that comprises MPMs specifying motioninformation for each block that is in the current picture and that isencoded prior to the current block. In such examples, video encoder 20may determine an MPM from the MPMs in the global motion vector candidatelist. In some examples, video encoder 20 may store a plurality ofnon-adjacent MPMs in a FIFO buffer. In such examples, the plurality ofnon-adjacent MPMs includes a non-adjacent MPM specifying the intraprediction mode of the non-adjacent block. Furthermore, in suchexamples, video encoder 20 may update the FIFO buffer to remove anearliest-added non-adjacent MPM from the FIFO buffer and may add an MPMto the FIFO buffer. The plurality of MPMs may include the MPMs in theFIFO buffer.

Furthermore, in the example of FIG. 35, video encoder 20 may generate apredictive block based on an intra prediction mode specified by an MPMof the plurality of MPMs (3502). Additionally, video encoder 20 maygenerate, based on the predictive block, residual sample values (3504).Video encoder 20 may determine the predictive block and generate theresidual sample values in accordance with any of the examples providedelsewhere in this disclosure.

FIG. 36 is a flowchart illustrating an example operation of videodecoder 30 for decoding video data, in accordance with a technique ofthis disclosure. In the example of FIG. 36, video decoder 30 maydetermine a plurality of MPMs (3600). Each respective MPM of theplurality of MPMs specifies a respective intra prediction mode of arespective block. In accordance with a technique of this disclosure, theplurality of MPMs includes a particular MPM that specifies an intraprediction mode of a non-adjacent block of a current picture of thevideo data. The non-adjacent block is non-adjacent to a current block ofthe current picture. In some examples, the non-adjacent block is a blockin a template that defines a fixed pattern of non-adjacent blocksrelative to a position of the current block. In other examples, thenon-adjacent block is a fixed distance from the current block. Thenon-adjacent block may be determined in accordance with any of theexamples provided elsewhere in this disclosure.

In some examples, as part of determining the plurality of MPMs, videodecoder 30 may determine an ordered list of the MPMs. In such examples,the MPMs based on non-adjacent blocks are ordered in the list accordingto frequency with which intra prediction modes are specified bynon-adjacent blocks in a plurality of non-adjacent blocks. In otherexamples, the MPMs based on the non-adjacent blocks are not ordered inthe list according to such a frequency.

In some examples, the plurality of MPMs is a global MPM list thatcomprises MPMs specifying motion information for each block that is inthe current picture and that is encoded prior to the current block. Insuch examples, video decoder 30 may determine an MPM from the MPMs inthe global motion vector candidate list. In some examples, video decoder30 may store a plurality of non-adjacent MPMs in a first-in, first-out(FIFO) buffer. In such examples, the plurality of non-adjacent MPMsincludes a non-adjacent MPM specifying the intra prediction mode of thenon-adjacent block. Furthermore, in such examples, video decoder 30 mayupdate the FIFO buffer to remove an earliest-added non-adjacent MPM fromthe FIFO buffer and adding an MPM to the FIFO buffer. The plurality ofMPMs may include the MPMs in the FIFO buffer.

Furthermore, in the example of FIG. 36, video decoder 30 may generate apredictive block based on an intra prediction mode specified by an MPMof the plurality of MPMs (3602). Additionally, video decoder 30 mayreconstruct, based on the predictive block, sample values of the currentpicture (3604). Video decoder 30 may generate the predictive block andreconstruct the sample values in accordance with any of the techniquesprovided elsewhere in this disclosure.

The techniques of this disclosure may be applied to video coding insupport of any of a variety of multimedia applications, such asover-the-air television broadcasts, cable television transmissions,satellite television transmissions, Internet streaming videotransmissions, such as dynamic adaptive streaming over HTTP (DASH),digital video that is encoded onto a data storage medium, decoding ofdigital video stored on a data storage medium, or other applications.

In this disclosure, ordinal terms such as “first,” “second,” “third,”and so on, are not necessarily indicators of positions within an order,but rather may simply be used to distinguish different instances of thesame thing.

It is to be recognized that depending on the example, certain acts orevents of any of the techniques described herein can be performed in adifferent sequence, may be added, merged, or left out altogether (e.g.,not all described acts or events are necessary for the practice of thetechniques). Moreover, in certain examples, acts or events may beperformed concurrently, e.g., through multi-threaded processing,interrupt processing, or multiple processors, rather than sequentially.

In one or more examples, the functions described may be implemented inhardware, software, firmware, or any combination thereof. If implementedin software, the functions may be stored on or transmitted over, as oneor more instructions or code, a computer-readable medium and executed bya hardware-based processing unit. Computer-readable media may includecomputer-readable storage media, which corresponds to a tangible mediumsuch as data storage media, or communication media including any mediumthat facilitates transfer of a computer program from one place toanother, e.g., according to a communication protocol. In this manner,computer-readable media generally may correspond to (1) tangiblecomputer-readable storage media which is non-transitory or (2) acommunication medium such as a signal or carrier wave. Data storagemedia may be any available media that can be accessed by one or morecomputers or one or more processing circuits to retrieve instructions,code and/or data structures for implementation of the techniquesdescribed in this disclosure. A computer program product may include acomputer-readable medium.

By way of example, and not limitation, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, cache memory, or any other medium that can be used to storedesired program code in the form of instructions or data structures andthat can be accessed by a computer. Also, any connection is properlytermed a computer-readable medium. For example, if instructions aretransmitted from a website, server, or other remote source using acoaxial cable, fiber optic cable, twisted pair, digital subscriber line(DSL), or wireless technologies such as infrared, radio, and microwave,then the coaxial cable, fiber optic cable, twisted pair, DSL, orwireless technologies such as infrared, radio, and microwave areincluded in the definition of medium. It should be understood, however,that computer-readable storage media and data storage media do notinclude connections, carrier waves, signals, or other transient media,but are instead directed to non-transient, tangible storage media. Diskand disc, as used herein, includes compact disc (CD), laser disc,optical disc, digital versatile disc (DVD), floppy disk and Blu-raydisc, where disks usually reproduce data magnetically, while discsreproduce data optically with lasers. Combinations of the above shouldalso be included within the scope of computer-readable media.

Functionality described in this disclosure may be performed by fixedfunction and/or programmable processing circuitry. For instance,instructions may be executed by fixed function and/or programmableprocessing circuitry. Such processing circuitry may include one or moreprocessors, such as one or more digital signal processors (DSPs),general purpose microprocessors, application specific integratedcircuits (ASICs), field programmable logic arrays (FPGAs), or otherequivalent integrated or discrete logic circuitry. Accordingly, the term“processor,” as used herein may refer to any of the foregoing structureor any other structure suitable for implementation of the techniquesdescribed herein. In addition, in some aspects, the functionalitydescribed herein may be provided within dedicated hardware and/orsoftware modules configured for encoding and decoding, or incorporatedin a combined codec. Also, the techniques could be fully implemented inone or more circuits or logic elements. Processing circuits may becoupled to other components in various ways. For example, a processingcircuit may be coupled to other components via an internal deviceinterconnect, a wired or wireless network connection, or anothercommunication medium.

The techniques of this disclosure may be implemented in a wide varietyof devices or apparatuses, including a wireless handset, an integratedcircuit (IC) or a set of ICs (e.g., a chip set). Various components,modules, or units are described in this disclosure to emphasizefunctional aspects of devices configured to perform the disclosedtechniques, but do not necessarily require realization by differenthardware units. Rather, as described above, various units may becombined in a codec hardware unit or provided by a collection ofinteroperative hardware units, including one or more processors asdescribed above, in conjunction with suitable software and/or firmware.

Various examples have been described. These and other examples arewithin the scope of the following claims.

What is claimed is:
 1. A method of decoding video data, the methodcomprising: deriving, by a video decoder, a plurality of non-adjacentspatial motion vector predictors (NA-SMVPs) from motion information ofspatially non-adjacent blocks located within a same current picture as acurrent block of the current picture, wherein, for each respectiveNA-SMVP of the plurality of NA-SMVPs, the respective NA-SMVP correspondsto a respective non-adjacent block in a fixed pattern of non-adjacentblocks of the current picture, the respective NA-SMVP specifying amotion vector of the respective non-adjacent block; determining, by thevideo decoder, a motion vector predictor (MVP) for the current blockbased on a NA-SMVP in the plurality of NA-SMVPs, wherein determining theMVP for the current block comprises: generating, by the video decoder, alist of MVP candidates, wherein the list of MVP candidates includes theplurality of NA-SMVPs; ordering, by the video decoder, the plurality ofNA-SMVPs in the list of MVP candidates according to distances ofcorresponding non-adjacent blocks of the NA-SMVPs from the currentblock; and determining, by the video decoder, from among the MVPcandidates in the list of MVP candidates, the MVP for the current block;determining, by the video decoder, based on the MVP for the currentblock, a motion vector of the current block; determining, by the videodecoder, a predictive block based on the motion vector of the currentblock; and reconstructing, by the video decoder, based on the predictiveblock, sample values of the current picture.
 2. The method of claim 1,further comprising applying, by the video decoder, a pruning process tothe list of MVP candidates, wherein the pruning process is adaptive to ablock size of the current block.
 3. The method of claim 1, whereindetermining the motion vector of the current block comprises:determining, by the video decoder, the motion vector of the currentblock such that the motion vector of the current block is equal to amotion vector of the MVP for the current block.
 4. The method of claim1, wherein determining the motion vector of the current block comprises:determining, by the video decoder, the motion vector of the currentblock such that the motion vector of the current block is equal to amotion vector of the MVP for the current block plus a motion vectordifference (MVD).
 5. A method of encoding video data, the methodcomprising: deriving, by a video encoder, a plurality of non-adjacentspatial motion vector predictors (NA-SMVPs) from motion information ofspatially non-adjacent blocks located within a same current picture as acurrent block of the current picture, wherein, for each respectiveNA-SMVP of the plurality of NA-SMVPs, the respective NA-SMVP correspondsto a respective non-adjacent block in a fixed pattern of non-adjacentblocks of the current picture, the respective NA-SMVP specifying amotion vector of the respective non-adjacent block; determining, by thevideo encoder, a motion vector predictor (MVP) for the current blockbased on a NA-SMVP in the plurality of NA-SMVPs, wherein determining theMVP for the current block comprises: generating, by the video encoder, alist of MVP candidates, wherein the list of MVP candidates includes theplurality of NA-SMVPs; ordering, by the video encoder, the plurality ofNA-SMVPs in the list of MVP candidates according to distances ofcorresponding non-adjacent blocks of the NA-SMVPs from the currentblock; and determining, by the video encoder, from among the MVPcandidates in the list of MVP candidates, the MVP for the current block;determining, by the video encoder, a motion vector of the current block,wherein the motion vector is equal to a motion vector of the MVP for thecurrent block or is equal to the motion vector of the MVP for thecurrent block plus a motion vector difference (MVD) signaled in abitstream; determining, by the video encoder, a predictive block basedon the motion vector of the current block; and generating, by the videoencoder, based on the predictive block, residual sample values.
 6. Themethod of claim 5, further comprising applying, by the video encoder, apruning process to the list of MVP candidates, wherein the pruningprocess is adaptive to a block size of the current block.
 7. Anapparatus for decoding video data, the apparatus comprising: one or morestorage media configured to store video data; and one or more processorsimplemented in circuitry, the one or more processors configured to:derive a plurality of non-adjacent spatial motion vector predictors(NA-SMVPs) from motion information of spatially non-adjacent blockslocated within a same current picture as a current block of the currentpicture, wherein, for each respective NA-SMVP of the plurality ofNA-SMVPs, the respective NA-SMVP corresponds to a respectivenon-adjacent block in a fixed pattern of non-adjacent blocks of thecurrent picture, the respective NA-SMVP specifying a motion vector ofthe respective non-adjacent block; determine a motion vector predictor(MVP) for the current block based on a NA-SMVP in the plurality ofNA-SMVPs, wherein the one or more processors are configured such that,as part of determining the MVP for the current block, the one or moreprocessors: generate a list of MVP candidates, wherein the list of MVPcandidates includes the plurality of NA-SMVPs; order the plurality ofNA-SMVPs in the list of MVP candidates according to distances ofcorresponding non-adjacent blocks of the NA-SMVPs from the currentblock; and determine, from among the MVP candidates in the list of MVPcandidates, the MVP for the current block; determine, based on the MVPfor the current block, a motion vector of the current block; determine apredictive block based on the motion vector of the current block; andreconstruct, based on the predictive block, sample values of the currentpicture.
 8. The apparatus of claim 7, wherein the one or more processorsare further configured to apply a pruning process to the list of MVPcandidates, wherein the pruning process is adaptive to a block size ofthe current block.
 9. The apparatus of claim 7, wherein the one or moreprocessors are configured such that, as part of determining the motionvector of the current block, the one or more processors: determine themotion vector of the current block such that the motion vector of thecurrent block is equal to a motion vector of the MVP candidate for thecurrent block.
 10. The apparatus of claim 7, wherein the one or moreprocessors are configured such that, as part of determining the motionvector of the current block, the one or more processors: determine themotion vector of the current block such that the motion vector of thecurrent block is equal to a motion vector of the MVP for the currentblock plus a motion vector difference (MVD).
 11. The apparatus of claim7, wherein the apparatus comprises: an integrated circuit, amicroprocessor, or a wireless communication device.
 12. An apparatus forencoding video data, the apparatus comprising: one or more storage mediaconfigured to store video data; and one or more processors implementedin circuitry, the one or more processors configured to: derive aplurality of non-adjacent spatial motion vector predictors (NA-SMVPs)from motion information of spatially non-adjacent blocks located withina same current picture as a current block of the current picture,wherein, for each respective NA-SMVP of the plurality of NA-SMVPs, therespective NA-SMVP corresponds to a respective non-adjacent block in afixed pattern of non-adjacent blocks of the current picture, therespective NA-SMVP specifying a motion vector of the respectivenon-adjacent block; determine a motion vector predictor (MVP) for thecurrent block based on a NA-SMVP in the plurality of NA-SMVPs, whereinthe one or more processors are configured such that, as part ofdetermining the MVP for the current block, the one or more processors:generate a list of MVP candidates, wherein the list of MVP candidatesincludes the plurality of NA-SMVPs; order the plurality of NA-SMVPs inthe list of MVP candidates according to distances of correspondingnon-adjacent blocks of the NA-SMVPs from the current block; anddetermine, from among the MVP candidates in the list of MVP candidates,the MVP for the current block; determine a motion vector of the currentblock, wherein the motion vector is equal to a motion vector of the MVPfor the current block or is equal to the motion vector of the MVP forthe current block plus a motion vector difference (MVD) signaled in abitstream; determine a predictive block based on the motion vector ofthe current block; and generate, based on the predictive block, residualsample values.
 13. The apparatus of claim 12, wherein the one or moreprocessors are further configured to apply a pruning process to the listof MVP candidates, wherein the pruning process is adaptive to a blocksize of the current block.
 14. The apparatus of claim 12, wherein theapparatus comprises: an integrated circuit, a microprocessor, or awireless communication device.
 15. An apparatus for decoding video data,the apparatus comprising: means for deriving a plurality of non-adjacentspatial motion vector predictors (NA-SMVPs) from motion information ofspatially non-adjacent blocks located within a same current picture as acurrent block of the current picture, wherein, for each respectiveNA-SMVP of the plurality of NA-SMVPs, the respective NA-SMVP correspondsto a respective non-adjacent block in a fixed pattern of non-adjacentblocks of the current picture, the respective NA-SMVP specifying amotion vector of the respective non-adjacent block; means fordetermining a motion vector predictor (MVP) for the current block basedon a NA-SMVP in the plurality of NA-SMVPs, wherein the means fordetermining the MVP for the current block comprises: means forgenerating a list of MVP candidates, wherein the list of MVP candidatesincludes the plurality of NA-SMVPs; means for ordering the plurality ofNA-SMVPs in the list of MVP candidates according to distances ofcorresponding non-adjacent blocks of the NA-SMVPs from the currentblock; and means for determining, from among the MVP candidates in thelist of MVP candidates, the MVP for the current block; means fordetermining, based on the MVP for the current block, a motion vector ofthe current block; means for determining a predictive block based on themotion vector of the current block; and means for reconstructing, basedon the predictive block, sample values of the current picture.
 16. Anapparatus for encoding video data, the apparatus comprising: means forderiving a plurality of non-adjacent spatial motion vector predictors(NA-SMVPs) from motion information of spatially non-adjacent blockslocated within a same current picture as a current block of the currentpicture, wherein, for each respective NA-SMVP of the plurality ofNA-SMVPs, the respective NA-SMVP corresponds to a respectivenon-adjacent block in a fixed pattern of non-adjacent blocks of thecurrent picture, the respective NA-SMVP specifying a motion vector ofthe respective non-adjacent block; means for determining a motion vectorpredictor (MVP) for the current block based on a NA-SMVP in theplurality of NA-SMVPs, wherein the means for determining the MVP for thecurrent block comprises: means for generating a list of MVP candidates,wherein the list of MVP candidates includes the plurality of NA-SMVPs;means for ordering the plurality of NA-SMVPs in the list of MVPcandidates according to distances of corresponding non-adjacent blocksof the NA-SMVPs from the current block; and means for determining, fromamong the MVP candidates in the list of MVP candidates, the MVP for thecurrent block; means for determining a motion vector of the currentblock, wherein the motion vector is equal to a motion vector of the MVPfor the current block or is equal to the motion vector of the MVP forthe current block plus a motion vector difference (MVD) signaled in abitstream; means for determining a predictive block based on the motionvector of the current block; and means for generating, based on thepredictive block, residual sample values.
 17. A computer-readablestorage medium storing instructions that, when executed, cause one ormore processors to: derive a plurality of non-adjacent spatial motionvector predictors (NA-SMVPs) from motion information of spatiallynon-adjacent blocks located within a same current picture as a currentblock of the current picture, wherein, for each respective NA-SMVP ofthe plurality of NA-SMVPs, the respective NA-SMVP corresponds to arespective non-adjacent block in a fixed pattern of non-adjacent blocksof the current picture, the respective NA-SMVP specifying a motionvector of the respective non-adjacent block; determine a motion vectorpredictor (MVP) for the current block based on a NA-SMVP in theplurality of NA-SMVPs, wherein the instructions that cause the one ormore processors to determine the MVP for the current block compriseinstructions that, when executed, cause the one or more processors to:generate a list of MVP candidates, wherein the list of MVP candidatesincludes the plurality of NA-SMVPs; order the plurality of NA-SMVPs inthe list of MVP candidates according to distances of correspondingnon-adjacent blocks of the NA-SMVPs from the current block; anddetermine, from among the MVP candidates in the list of MVP candidates,the MVP for the current block; determine, based on the MVP for thecurrent block, a motion vector of the current block; determine apredictive block based on the motion vector of the current block; andreconstruct, based on the predictive block, sample values of the currentpicture.
 18. A computer-readable storage medium storing instructionsthat, when executed, cause one or more processors to: derive a pluralityof non-adjacent spatial motion vector predictors (NA-SMVPs) from motioninformation of spatially non-adjacent blocks located within a samecurrent picture as a current block of the current picture, wherein, foreach respective NA-SMVP of the plurality of NA-SMVPs, the respectiveNA-SMVP corresponds to a respective non-adjacent block in a fixedpattern of non-adjacent blocks of the current picture, the respectiveNA-SMVP specifying a motion vector of the respective non-adjacent block;determine a motion vector predictor (MVP) for the current block based ona NA-SMVP in the plurality of NA-SMVPs, wherein the instructions thatcause the one or more processors to determine the MVP for the currentblock comprise instructions that, when executed, cause the one or moreprocessors to: generate a list of MVP candidates, wherein the list ofMVP candidates includes the plurality of NA-SMVPs; order the pluralityof NA-SMVPs in the list of MVP candidates according to distances ofcorresponding non-adjacent blocks of the NA-SMVPs from the currentblock; and determine, from among the MVP candidates in the list of MVPcandidates, the MVP for the current block; determine a motion vector ofthe current block, wherein the motion vector is equal to a motion vectorof the MVP for the current block or is equal to the motion vector of theMVP for the current block plus a motion vector difference (MVD) signaledin a bitstream; determine a predictive block based on the motion vectorof the current block; and generate, based on the predictive block,residual sample values.